mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Init STRLEN result when deprecation promoted to exception
Move the result initialization before HANDLE_EXCEPTION(), the actual value doesn't matter. This fixes one of the issues report in bug #81190.
This commit is contained in:
parent
36cb48c937
commit
353f963bba
3 changed files with 21 additions and 4 deletions
|
@ -5461,10 +5461,10 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST
|
|||
if (UNEXPECTED(Z_TYPE_P(value) == IS_NULL)) {
|
||||
zend_error(E_DEPRECATED,
|
||||
"strlen(): Passing null to parameter #1 ($string) of type string is deprecated");
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), 0);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -14648,10 +14648,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEN
|
|||
if (UNEXPECTED(Z_TYPE_P(value) == IS_NULL)) {
|
||||
zend_error(E_DEPRECATED,
|
||||
"strlen(): Passing null to parameter #1 ($string) of type string is deprecated");
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), 0);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -38691,10 +38691,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CV_HANDLER(ZEND_OP
|
|||
if (UNEXPECTED(Z_TYPE_P(value) == IS_NULL)) {
|
||||
zend_error(E_DEPRECATED,
|
||||
"strlen(): Passing null to parameter #1 ($string) of type string is deprecated");
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), 0);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
ZVAL_LONG(EX_VAR(opline->result.var), 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue