[TYPO3-core] RFC #15457: Add support for prepared queries [summary and pending questions]
Jigal van Hemert
jigal at xs4all.nl
Sun Aug 22 12:33:32 CEST 2010
Hi,
On 21-8-2010 22:36, Helmut Hummel wrote:
> Damn, the backupGlobals feature does not work for the
> $GLOBALS['TYPO3_DB'] object, because it serializes the globals, thus the
> resource ($GLOBALS['TYPO3_DB']->link) is lost because PHP serialize()
> cannot handle resource-types :-/
serialize() calls __sleep() of the object it will serialize and
unserialize() will call __wakeup() when restoring the object.
If t3lib_db had a __wakup() function to re-connect the database the
$GLOBALS['TYPO3_DB'] object would probably survive serializing. It will
have a different connection so you can't restore it in the middle of a
transaction, but in most cases it will probably be sufficient.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the TYPO3-team-core
mailing list