[TYPO3-core] RFC: Bug #0006663: Unserialized objects not debugged properly
Francois Suter
fsuter at cobweb.ch
Thu Feb 28 20:55:23 CET 2008
Hi,
Can this go into 4.1.6?
I have attached a new patch taking into account further corrections to
t3lib_div::view_array() that were done in the 4.2 branch.
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
> This is an SVN patch request.
>
> Type: Bugfix
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=6663
>
> Branches:
> Trunk
>
> Problem:
> Unserialized objects with no class definition are not considered proper
> objects by PHP 5.2.x. t3lib_div::view_array() thus fails to catch them
> with the is_object() test. It then moves on to cast them to string,
> which causes a fatal error (as referenced previously in bug
> http://bugs.typo3.org/view.php?id=6529).
>
> Solution:
> Perform more precise tests to catch those special objects using
> gettype(). I know that gettype() usage is not recommended, but I
> couldn't find another workaround to that problem. A try/catch statement
> didn't work although PHP says it is a catchable error.
>
> Notes:
> I also added a test for the existence of the __toString() method so that
> it is used if available and did a minor code cleanup by replacing the
> while/each construct with a foreach loop.
>
>
> Francois Suter
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug6663-4_1.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080228/c719ab13/attachment.txt
More information about the TYPO3-team-core
mailing list