[wp-hackers] Have I gone mad?

David Anderson david at wordshell.net
Mon Apr 29 07:46:20 UTC 2013


>   if (!isset($_POST['updraft_**restore']) ||
> !is_array(maybe_unserialize($_POST['updraft_**restore']))) {

I've obviously created something of a red herring by serialising the 
error output and unserialising it together with a typo. Let me explain 
the problem a different way:

Here is the code:

         if (!isset($_POST['updraft_restore']) || 
!is_array($_POST['updraft_restore'])) {
             echo '<p>'.__('ABORT: Could not find the information on 
which entities to restore.', 'updraftplus').'</p>';
             return false;
         }

I have a user who (every time) hits this error condition. When I get him 
to print_r his $_POST array (in the same code, so there's no other code 
editing the $_POST array), he gets this:

Array (
     [action] => updraft_restore
     [backup_timestamp] => 1366984477
     [updraft_restore] => Array
         (
             [0] => plugins
             [1] => themes
             [2] => uploads
             [3] => others
             [4] => db
         )
)

How can that happen??

David

On 28/04/13 12:47, wp-hackers-request at lists.automattic.com wrote:



More information about the wp-hackers mailing list