|
Posted by Janwillem Borleffs on 01/14/06 00:05
Rafi B. wrote:
> This is the context in which it is executed:
> $line = "====1,$tt,$sql\n";
> $rs2->sql = $rs->sql;
> $rs2->oldProvider = $rs->dataProvider;
> $rs2->InitArrayFields($rows,$flds);
> $rs2->fetchMode = $savefetch;
> return $line.serialize($rs2);
>
[...]
> Any help why serialize() will just crash like this?
>
Well, for one thing, $line.serialize() isn't valid PHP syntax for a method
call, because of the dot. That it executes on your friend's system probably
has to do with his error_reporting and display_errors settings. Ask him if
queries ever get cached and the answer probably will be negative.
When the $rs2 object contains the serialize method, you probably should do
something like:
return $rs2->serialize();
When, however, you goal is to apply the native PHP serialize function, the
call probably should be:
return serialize($rs2);
JW
[Back to original message]
|