[wp-testers] RE: wp-admin/plugins.php (rev 2932) error line 90

Abhay Kumar aranis at gmail.com
Tue Nov 29 22:22:46 GMT 2005


Sorry for the double post on this thread but I've confirmed the
problem as the empty array is not being unserialized as it should be
before it reaches the variable. I've posted as such in trac.

There is the ugly but easy solution which is to unserialize the
returned bytestream in the plugins.php file itself or the better
solution which is to find out why maybe_unserialize()
(./wp-includes/functions.php: line 260) is passing the original string
as such.

By my understanding, maybe_unserialize($original) checks if the
unserialized version of the argument it is given is a non-empty
(non-zero) object if this is the case, it returns it. Otherwise it
returns the original, as is.

Could some one clarify this?

Abhay

On 11/29/05, Abhay Kumar <aranis at gmail.com> wrote:
> Nice find Toby and thanks for posting the bug report.
>
> > It appears that in 1.5 the same thing happened, the fix there was a
> > precautionary is_array() loop (see http://trac.wordpress.org/changeset/2501)
> That seems to be a really bad way to fix the error (and it was a bad
> way to fix it the first time as well) as it doesn't really _fix_
> anything except ignore the error. Doing it again will fix the issue of
> the warnings but will not fix anything if you try to activate a
> plugin. You'd need to have another precautionary loop around line 10.
>
> I think the issue is that the 'empty' plugin list was stored initially
> as a string during the clean install procedures and this is what needs
> to be fixed. I guessing what we see as the string is the empty array
> represented as a bytestream.
>
> I've also posted the same message to trac.
>


More information about the wp-testers mailing list