Skip to content

Commit f51e1c2

Browse files
committed
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.
1 parent 345e025 commit f51e1c2

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/classes/array_access_001.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,16 @@ array(4) {
9696
}
9797
===EMPTY===
9898
object::offsetExists(0)
99+
object::offsetGet(0)
99100
bool(false)
100101
object::offsetExists(1)
102+
object::offsetGet(1)
101103
bool(false)
102104
object::offsetExists(2)
105+
object::offsetGet(2)
103106
bool(false)
104107
object::offsetExists(4th)
108+
object::offsetGet(4th)
105109
bool(false)
106110
object::offsetExists(5th)
107111
bool(true)

tests/classes/array_access_002.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,16 @@ array(4) {
9696
}
9797
===EMPTY===
9898
object::offsetExists(0)
99+
object::offsetGet(0)
99100
bool(false)
100101
object::offsetExists(1)
102+
object::offsetGet(1)
101103
bool(false)
102104
object::offsetExists(2)
105+
object::offsetGet(2)
103106
bool(false)
104107
object::offsetExists(4th)
108+
object::offsetGet(4th)
105109
bool(false)
106110
object::offsetExists(5th)
107111
bool(true)

0 commit comments

Comments
 (0)