File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-17797 (zend_test_compile_string crash on invalid script path)
3
+ --EXTENSIONS--
4
+ zend_test
5
+ --CREDITS--
6
+ YuanchengJiang
7
+ --FILE--
8
+ <?php
9
+ $ source = '<?php
10
+ require("sumfile.php");
11
+ ?> ' ;
12
+ try {zend_test_compile_string ($ source ,$ source ,$ c );} catch (Exception $ e ) { echo ($ e ); }
13
+ --EXPECTF --
14
+
15
+ Warning: Undefined variable $ c in %s on line %d
16
+
17
+ Deprecated: zend_test_compile_string(): Passing null to parameter #3 ($position) of type int is deprecated in %s on line %d
18
+
19
+ Warning: require (sumfile.php): Failed to open stream: No such file or directory in <?php
20
+ require ("sumfile.php " );
21
+ ?> on line %d
22
+
23
+ Fatal error: Uncaught Error: Failed opening required 'sumfile.php' (include_path='.:') in <?php
24
+ require ("sumfile.php " );
25
+ ?> :%d
26
+ Stack trace:
27
+ #0 %s(%d): zend_test_compile_string('<?php \nrequire("...', '<?php \nrequire( " .. .', NULL)
28
+ #1 {main}
29
+ thrown in <?php
30
+ require("sumfile.php");
31
+ ?> on line %d
You can’t perform that action at this time.
0 commit comments