diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 1d4c14dd07e3f..3ec469382cad9 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -243,7 +243,7 @@ static ZEND_FUNCTION(zend_test_compile_string) ZEND_PARSE_PARAMETERS_START(3, 3) Z_PARAM_STR(source_string) - Z_PARAM_PATH_STR_EX(filename, 1, 0) + Z_PARAM_PATH_STR(filename) Z_PARAM_LONG(position) ZEND_PARSE_PARAMETERS_END(); diff --git a/ext/zend_test/tests/zend_test_compile_string.phpt b/ext/zend_test/tests/zend_test_compile_string.phpt index c03c46b0100dc..fb47f748f87a7 100644 --- a/ext/zend_test/tests/zend_test_compile_string.phpt +++ b/ext/zend_test/tests/zend_test_compile_string.phpt @@ -49,6 +49,7 @@ try { echo $e->getMessage(), PHP_EOL; } +zend_test_compile_string(null, null, null); $source_string = << ---EXPECT-- +--EXPECTF-- string(3) "php" #!/path/to/php string(3) "php" @@ -66,4 +67,10 @@ string(3) "php" string(3) "php" zend_test_compile_string(): Argument #2 ($filename) must not contain any null bytes +Deprecated: zend_test_compile_string(): Passing null to parameter #1 ($source_string) of type string is deprecated in %s on line %d + +Deprecated: zend_test_compile_string(): Passing null to parameter #2 ($filename) of type string is deprecated in %s on line %d + +Deprecated: zend_test_compile_string(): Passing null to parameter #3 ($position) of type int is deprecated in %s on line %d + Parse error: syntax error, unexpected token "<", expecting end of file in Source string on line 1