[wp-hackers] Have I gone mad?

David Anderson david at wordshell.net
Fri Apr 26 18:48:37 UTC 2013


Here's a great puzzle for someone...

I've had a bug report for one of my plugins 
(http://wordpress.org/extend/plugins/updraftplus). The bug reporter 
reports this message: "ABORT: Could not find the information on which 
entities to restore."

That comes from this 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>';
             echo '<p>'.__('If making a request for support, please 
include this information:','updraftplus').'  : 
'.htmlspecialchars(serialize($_POST)).'</p>';
             return false;
         }

But here's the kicker; here's the included information:

a:3:{s:6:"action";s:15:"updraft_restore";s:16:"backup_timestamp";s:10:"1366984477";s:15:"updraft_restore";a:5{i:0;s:7:"plugins";i:1;s:6:"themes";i:2;s:7:"uploads";i:3;s:6:"others";i:4;s:2:"db";}}

And that, when unserialized, is:

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

So, $_POST['updraft_restore'] is set, and is an array... so how does the 
error condition trigger? Am I mad?

David

-- 
WordShell - WordPress fast from the CLI - www.wordshell.net



More information about the wp-hackers mailing list