[php-src] master: Fixed incorrect error message

From: Date: Wed, 21 Apr 2021 23:40:37 +0000
Subject: [php-src] master: Fixed incorrect error message
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-115735@lists.php.net to get a copy of this message
Author: Dmitry Stogov (dstogov) Date: 2021-04-22T02:40:22+03:00 Commit: https://github.com/php/php-src/commit/76452651ba5ac4532cb5ce824ebca80cdfe0a0b7 Raw diff: https://github.com/php/php-src/commit/76452651ba5ac4532cb5ce824ebca80cdfe0a0b7.diff Fixed incorrect error message Changed paths: M ext/opcache/jit/zend_jit_helpers.c Diff: diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 9ed28ed3e2b9..ba32c64f5426 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -27,12 +27,16 @@ static ZEND_COLD void undef_result_after_exception() { } } +static ZEND_COLD void zend_jit_illegal_offset(void) +{ + zend_type_error("Illegal offset type"); +} + static ZEND_COLD void zend_jit_illegal_string_offset(zval *offset) { zend_type_error("Cannot access offset of type %s on string", zend_zval_type_name(offset)); } - static zend_never_inline zend_function* ZEND_FASTCALL _zend_jit_init_func_run_time_cache(const zend_op_array *op_array) /* {{{ */ { void **run_time_cache; @@ -408,7 +412,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_r_helper(zend_array *ht, zval *dim, hval = 1; goto num_index; default: - zend_jit_illegal_string_offset(dim); + zend_jit_illegal_offset(); undef_result_after_exception(); return; } @@ -473,7 +477,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_is_helper(zend_array *ht, zval *dim hval = 1; goto num_index; default: - zend_jit_illegal_string_offset(dim); + zend_jit_illegal_offset(); undef_result_after_exception(); return; } @@ -603,7 +607,7 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_rw_helper(zend_array *ht, zval *di hval = 1; goto num_index; default: - zend_jit_illegal_string_offset(dim); + zend_jit_illegal_offset(); undef_result_after_exception(); return NULL; } @@ -676,7 +680,7 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim hval = 1; goto num_index; default: - zend_jit_illegal_string_offset(dim); + zend_jit_illegal_offset(); undef_result_after_exception(); return NULL; }

« previous php.cvs (#115735) next »