Skip to content

Commit 8ee2f61

Browse files
committed
Review zend_is_true() usage in zend_API.c
1 parent 8592167 commit 8ee2f61

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
@@ -474,6 +474,10 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest, uint
474474
return 0;
475475
}
476476
*dest = zend_is_true(arg);
477+
/* arg is an object which cannot be converted to bool */
478+
if (UNEXPECTED(EG(exception))) {
479+
return 0;
480+
}
477481
} else {
478482
return 0;
479483
}

0 commit comments

Comments
 (0)