[TYPO3-core] RFC: Bug #0006663: Unserialized objects not debugged properly

Ingmar Schlecht ingmar at typo3.org
Sun Dec 2 20:58:05 CET 2007


Adding my +1, I have committed this to trunk.

cheers
Ingmar

Francois Suter schrieb:
> REMINDER #3
> 
>> 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.
> 


-- 
Ingmar Schlecht
TYPO3 Association Active Member


More information about the TYPO3-team-core mailing list