Skip to content

Commit

Permalink
#2186 - Add IS_NULL check during string variable initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Apr 7, 2021
1 parent 4a224c4 commit 713506f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernels/ZendEngine3/operators.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ long zephir_safe_mod_double_zval(double op1, zval *op2);
zval right_tmp; \
if (Z_TYPE_P(right) == IS_STRING) { \
ZEPHIR_CPY_WRT(left, right); \
} else if (Z_TYPE_P(right) == IS_NULL) { \
// TODO: Re-visit this check, when ZEND_PARSE_PARAMETERS_* will be in better condition in Zephir
ZEPHIR_INIT_VAR(left); \
} else { \
use_copy_right = zephir_make_printable_zval(right, &right_tmp); \
if (use_copy_right) { \
Expand Down

0 comments on commit 713506f

Please sign in to comment.