Skip to content

Commit

Permalink
Merge pull request #207 from nielsdos/fix-206
Browse files Browse the repository at this point in the history
Fix #206: Null coalescing operator on Vector make search failed
  • Loading branch information
rtheunissen authored Feb 28, 2024
2 parents d42dec5 + 53b5793 commit 5f8915d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/php/handlers/php_deque_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static zval *php_ds_deque_read_dimension

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

Expand Down
2 changes: 1 addition & 1 deletion src/php/handlers/php_map_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static zval *php_ds_map_read_dimension

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

Expand Down
2 changes: 1 addition & 1 deletion src/php/handlers/php_set_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static zval *php_ds_set_read_dimension
}

// Only support read, not write.
if (type != BP_VAR_R) {
if (type != BP_VAR_R && type != BP_VAR_IS) {
return &EG(uninitialized_zval);
}

Expand Down
2 changes: 1 addition & 1 deletion src/php/handlers/php_vector_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static zval *php_ds_vector_read_dimension

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

Expand Down

0 comments on commit 5f8915d

Please sign in to comment.