Skip to content

Commit 5f8915d

Browse files
authored
Merge pull request #207 from nielsdos/fix-206
Fix #206: Null coalescing operator on Vector make search failed
2 parents d42dec5 + 53b5793 commit 5f8915d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/php/handlers/php_deque_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static zval *php_ds_deque_read_dimension
3737

3838
// If we're accessing by reference we have to create a reference.
3939
// This is for access like $deque[$a][$b] = $c
40-
if (value && type != BP_VAR_R) {
40+
if (value && type != BP_VAR_R && type != BP_VAR_IS) {
4141
ZVAL_MAKE_REF(value);
4242
}
4343

src/php/handlers/php_map_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static zval *php_ds_map_read_dimension
3535

3636
// If we're accessing by reference we have to create a reference.
3737
// This is for access like $map[$a][$b] = $c
38-
if (value && type != BP_VAR_R) {
38+
if (value && type != BP_VAR_R && type != BP_VAR_IS) {
3939
ZVAL_MAKE_REF(value);
4040
}
4141

src/php/handlers/php_set_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static zval *php_ds_set_read_dimension
2020
}
2121

2222
// Only support read, not write.
23-
if (type != BP_VAR_R) {
23+
if (type != BP_VAR_R && type != BP_VAR_IS) {
2424
return &EG(uninitialized_zval);
2525
}
2626

src/php/handlers/php_vector_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static zval *php_ds_vector_read_dimension
3737

3838
// If we're accessing by reference we have to create a reference.
3939
// This is for access like $deque[$a][$b] = $c
40-
if (value && type != BP_VAR_R) {
40+
if (value && type != BP_VAR_R && type != BP_VAR_IS) {
4141
ZVAL_MAKE_REF(value);
4242
}
4343

0 commit comments

Comments
 (0)