Browse Source

Fixed bug #33512 (Add missing support for isset()/unset() overloading to complement the property get/set methods). Now empty($obj[...]) works proper but in addition it may call offsetGet() method.

PHP-5.1
Dmitry Stogov 21 years ago
parent
commit
f51e1c2064
  1. 4
      tests/classes/array_access_001.phpt
  2. 4
      tests/classes/array_access_002.phpt

4
tests/classes/array_access_001.phpt

@ -96,12 +96,16 @@ array(4) {
}
===EMPTY===
object::offsetExists(0)
object::offsetGet(0)
bool(false)
object::offsetExists(1)
object::offsetGet(1)
bool(false)
object::offsetExists(2)
object::offsetGet(2)
bool(false)
object::offsetExists(4th)
object::offsetGet(4th)
bool(false)
object::offsetExists(5th)
bool(true)

4
tests/classes/array_access_002.phpt

@ -96,12 +96,16 @@ array(4) {
}
===EMPTY===
object::offsetExists(0)
object::offsetGet(0)
bool(false)
object::offsetExists(1)
object::offsetGet(1)
bool(false)
object::offsetExists(2)
object::offsetGet(2)
bool(false)
object::offsetExists(4th)
object::offsetGet(4th)
bool(false)
object::offsetExists(5th)
bool(true)

Loading…
Cancel
Save