[BUGFIX] Segfaults on object comparisons 09/19209/2
authorAndreas Wolf <andreas.wolf@typo3.org>
Sat, 23 Mar 2013 10:12:38 +0000 (11:12 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 26 Mar 2013 20:08:47 +0000 (21:08 +0100)
commitbaf5860fbee2e854958417cc51cab6a7dc8c6dac
tree0746aed351d7c107b167fa065c0137b680323bc3
parent3e65a91c23839eba02cf5436ae2d4bf84e2a66ab
[BUGFIX] Segfaults on object comparisons

In the ResourceStorage class, the identity of source and target storage
has to be verified for several operations (copy, move). When the
comparison is done with a simple equality operator (==), the properties
of both objects are compared when the objects are not identical. This
comparison led to a segfault in several environments, presumably because
of a meanwhile fixed PHP bug (https://bugs.php.net/bug.php?id=61557).

To prevent these segfaults on affected PHP versions, the comparison is
extended to check for object identity (===). This will not affect the
behaviour of the code, as there should always be only one object per
storage.

Change-Id: I378c447f75c00859447cf1443f64b81e54161c54
Resolves: #46584
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19209
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Resource/ResourceStorage.php