Skip to content

Commit 3af0c31

Browse files
committed
Review zend_is_true() usage in zend_API.c
1 parent 7a536fd commit 3af0c31

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Zend/zend_API.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,10 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, zend_bool *dest)
430430
{
431431
if (EXPECTED(Z_TYPE_P(arg) <= IS_STRING)) {
432432
*dest = zend_is_true(arg);
433+
/* arg is an object which cannot be converted to bool */
434+
if (UNEXPECTED(EG(exception))) {
435+
return 0;
436+
}
433437
} else {
434438
return 0;
435439
}

0 commit comments

Comments
 (0)