Review main Merged

19209[BUGFIX] Segfaults on object comparisons

Andreas Wolf CR +2 V +2 Easy +4 −4 updated 06/03/13, 20:49

Commit message

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.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Alexander Opitz +1
  • Verified V +2
    • Christian Kuhn +2
    • Alexander Opitz +1

Issues 1

Files 1

Review log 4

  1. Alexander Opitz commented on patch set 1 03/26/13, 20:08

    Verified; Looks good to me, but someone else must approve Fixes crash on my environment (Linux PHP 5.4.6-1ubuntu1.2 mod_php).
  2. Mr. Jenkins commented on patch set 1 03/26/13, 20:08

  3. Christian Kuhn commented on patch set 1 V 0 03/26/13, 20:08

    by team member; Looks good to me, approved
  4. Christian Kuhn merged patch set 2 03/26/13, 20:08