Skip to content

Commit 167a199

Browse files
committed
Review zend_is_true() usage in zend_API.c
1 parent 1bf883e commit 167a199

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
@@ -478,6 +478,10 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest, uint
478478
return 0;
479479
}
480480
*dest = zend_is_true(arg);
481+
/* arg is an object which cannot be converted to bool */
482+
if (UNEXPECTED(EG(exception))) {
483+
return 0;
484+
}
481485
} else {
482486
return 0;
483487
}

0 commit comments

Comments
 (0)