[phplib] bug in serialize() From: Eric Ries (eric.ries <email protected>)
Date: 07/15/00

Hey folks, I just came across this bug in serialize() while trying to get
it to serialize an OOHFORMS object. Turns out to be a lot trickier than you
might think. serialize() seems to barf on statements like this:

$GLOBALS["sq"]->form->elements["x[filter_2]"]["ob"]->sql_func

I think this is probably fixable using some combination of {} - I think the
two-D array is throwing it off. OTOH, it could also be a PHP parser
problem. I'm using 3.0.15

Any help is appreciated, if there's a workaround. I'll start trying to find
a fix for for the general case. (Actually, the fact that it got this far is
a result of the following hack applied to the "object" case of serialize(),
otherwise it will barf one level sooner)

         eval("\$k_ob = \$${prefix}; \$l_ob = \$${prefix};");
         $k = $k_ob->classname;

         $l = reset($l_ob->persistent_slots);

Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>