File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ PHP NEWS
11
11
prototype). (Bob)
12
12
. Fixed bug GH-18581 (Coerce numeric string keys from iterators when argument
13
13
unpacking). (ilutov)
14
+ . Fixed OSS-Fuzz #434346548 (Failed assertion with throwing __toString in
15
+ binary const expr). (ilutov)
14
16
15
17
- FTP:
16
18
. Fix theoretical issues with hrtime() not being available. (nielsdos)
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ OSS-Fuzz #434346548: Failed assertion with throwing __toString in binary const expr
3
+ --FILE--
4
+ <?php
5
+
6
+ class Foo {
7
+ function __toString () {}
8
+ }
9
+
10
+ function test ($ y = new Foo () < "" ) {
11
+ var_dump ();
12
+ }
13
+
14
+ try {
15
+ test ();
16
+ } catch (Error $ e ) {
17
+ echo $ e ->getMessage (), "\n" ;
18
+ }
19
+
20
+ ?>
21
+ --EXPECT--
22
+ Foo::__toString(): Return value must be of type string, none returned
Original file line number Diff line number Diff line change @@ -585,9 +585,10 @@ ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_inner(
585
585
ret = FAILURE ;
586
586
} else {
587
587
binary_op_type op = get_binary_op (ast -> attr );
588
- ret = op (result , & op1 , & op2 );
588
+ op (result , & op1 , & op2 );
589
589
zval_ptr_dtor_nogc (& op1 );
590
590
zval_ptr_dtor_nogc (& op2 );
591
+ ret = EG (exception ) ? FAILURE : SUCCESS ;
591
592
}
592
593
break ;
593
594
case ZEND_AST_GREATER :
You can’t perform that action at this time.
0 commit comments