[TYPO3-mvc] spl_object_hash not matching when using in Fluid ajax widget

Jonas Götze jonnsn at gmail.com
Wed Mar 9 14:26:42 CET 2011


Am 08.03.2011 17:07, schrieb Dennis Ahrens:
> Quote from http://www.php.net/manual/en/language.oop5.object-comparison.php
>
> On the other hand, when using the identity operator (===), object
> variables are identical if and only if they refer to the same instance
> of the same class.
>
> The first comment under spl_object_hash also points in this direction.
>
> Is $myObject fetched from the WidgetContext? The Context is serialized /
> unserialized between the php calls. The IdentityMap does not know about
> those reconstructed objects than and creates new objects if you ask the
> repository - maybe the problem is located there.
>
> regards
> Dennis

Yes the object is fetched from the widgetContext - anyhow fetching the 
Object directly from the repository using the uid of the object from the 
widgetContext results in the same spl_object_hash. Shouldn't this work then?

It works now using the way Marc Bastian suggested, which is not that 
dirty in my oppinion. So this is solved for me by now - do you think we 
should still try to find the reason though? There might not always exist 
such a workaround...

Regards
Jonas


More information about the TYPO3-project-typo3v4mvc mailing list