Skip to content
Permalink
Browse files

Update test due to change in PHP 7.4 error message

  • Loading branch information...
derickr committed Jun 10, 2019
1 parent 41e09a8 commit 585dee1177d839017a0a92651b8b8244213fa6b4
Showing with 55 additions and 5 deletions.
  1. +10 −5 tests/{bug00032-php7.phpt → bug00032-php70.phpt}
  2. +45 −0 tests/bug00032-php74.phpt
@@ -1,5 +1,10 @@
--TEST--
Test for segmentation fault with unusual variables
Test for segmentation fault with unusual variables (< PHP 7.4)
--SKIPIF--
<?php
require __DIR__ . '/utils.inc';
check_reqs('PHP < 7.4');
?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
@@ -23,16 +28,16 @@ xdebug.dump_globals=0
echo ${new stdclass} . "\n";
?>
--EXPECTF--
Notice: Array to string conversion in %sbug00032-php7.php on line 8
Notice: Array to string conversion in %sbug00032-php70.php on line 8


Notice: Array to string conversion in %sbug00032-php7.php on line 9
Notice: Array to string conversion in %sbug00032-php70.php on line 9

foo
foo
foo

Catchable fatal error: Object of class stdClass could not be converted to string in %sbug00032-php7.php on line 11
Catchable fatal error: Object of class stdClass could not be converted to string in %sbug00032-php70.php on line 11

Call Stack:
%w%f %w%d 1. {main}() %sbug00032-php7.php:0
%w%f %w%d 1. {main}() %sbug00032-php70.php:0
@@ -0,0 +1,45 @@
--TEST--
Test for segmentation fault with unusual variables (>= PHP 7.4)
--SKIPIF--
<?php
require __DIR__ . '/utils.inc';
check_reqs('PHP >= 7.4');
?>
--INI--
xdebug.default_enable=1
xdebug.auto_trace=0
xdebug.collect_params=1
xdebug.collect_assignments=0
xdebug.profiler_enable=0
xdebug.show_local_vars=0
xdebug.dump_globals=0
--FILE--
<?php
${1} = "foo";
echo ${1} . "\n";
${STDIN} = "foo";
echo ${STDIN} . "\n";
${array(1,2,3)} = "foo";
echo ${array(1,2,3)} . "\n";
${new stdclass} = "foo";
echo ${new stdclass} . "\n";
?>
--EXPECTF--
Notice: Array to string conversion in %sbug00032-php74.php on line 8


Notice: Array to string conversion in %sbug00032-php74.php on line 9

foo
foo
foo

Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in %sbug00032-php74.php on line 11

Error: Object of class stdClass could not be converted to string in %sbug00032-php74.php on line 11

Call Stack:
%w%f %w%d 1. {main}() %sbug00032-php74.php:0

0 comments on commit 585dee1

Please sign in to comment.
You can’t perform that action at this time.