Skip to content

Commit

Permalink
Fix zephir-lang#1946 use ZVAL_NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet authored and dreamsxin committed Nov 6, 2019
1 parent ffe2814 commit 81c83d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernels/ZendEngine3/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,8 @@ void zephir_preg_match(zval *return_value, zval *regex, zval *subject, zval *mat
zval rv, tmp_matches;
zval *rvp = return_value ? return_value : &rv;

ZEPHIR_NULL(&tmp_flags);
ZEPHIR_NULL(&tmp_offset);
ZVAL_NULL(&tmp_flags);
ZVAL_NULL(&tmp_offset);

ZVAL_LONG(&tmp_flags, flags);
ZVAL_LONG(&tmp_offset, offset);
Expand Down Expand Up @@ -1183,7 +1183,7 @@ int zephir_json_encode(zval *return_value, zval *v, int opts)
zval zopts;
zval *params[2];

ZEPHIR_NULL(&zopts);
ZVAL_NULL(&zopts);
ZVAL_LONG(&zopts, opts);

params[0] = v;
Expand All @@ -1197,7 +1197,7 @@ int zephir_json_decode(zval *return_value, zval *v, zend_bool assoc)
zval zassoc;
zval *params[2];

ZEPHIR_NULL(&zassoc);
ZVAL_NULL(&zassoc);
ZVAL_BOOL(&zassoc, assoc);

params[0] = v;
Expand Down

0 comments on commit 81c83d9

Please sign in to comment.