Skip to content

Commit

Permalink
PHP 7.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Sep 20, 2018
1 parent caf84c9 commit f95bc22
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
6 changes: 3 additions & 3 deletions tests/bug00391-php7.phpt
Expand Up @@ -30,16 +30,16 @@ echo "And going and going...\n";
?>
DONE
--EXPECTF--
TypeError: Argument 1 passed to B::myMethod() must be an instance of A, integer given, called in %sbug00391-php7.php on line 17 in %sbug00391-php7.php on line 10
TypeError: Argument 1 passed to B::myMethod() must be an instance of A, int%S given, called in %sbug00391-php7.php on line 17 in %sbug00391-php7.php on line 10

Call Stack:
%w%f%w%d 1. {main}() %sbug00391-php7.php:0
%w%f%w%d 2. B->myMethod() %sbug00391-php7.php:17


Fatal error: Uncaught TypeError: Argument 1 passed to B::myMethod() must be an instance of A, integer given, called in %sbug00391-php7.php on line 17 and defined in %sbug00391-php7.php on line 10
Fatal error: Uncaught TypeError: Argument 1 passed to B::myMethod() must be an instance of A, int%S given, called in %sbug00391-php7.php on line 17 and defined in %sbug00391-php7.php on line 10

TypeError: Argument 1 passed to B::myMethod() must be an instance of A, integer given, called in %sbug00391-php7.php on line 17 in %sbug00391-php7.php on line 10
TypeError: Argument 1 passed to B::myMethod() must be an instance of A, int%S given, called in %sbug00391-php7.php on line 17 in %sbug00391-php7.php on line 10

Call Stack:
%w%f%w%d 1. {main}() %sbug00391-php7.php:0
Expand Down
6 changes: 3 additions & 3 deletions tests/bug00567-php7-nts.phpt
Expand Up @@ -18,6 +18,6 @@ function func(){

func();
?>
--EXPECT--
a: (refcount=0, is_ref=0)='hoge'
a: (refcount=0, is_ref=0)='hoge'(29)
--EXPECTF--
a: (refcount=%d, is_ref=0)='hoge'
a: (refcount=%d, is_ref=0)='hoge'(29)
2 changes: 1 addition & 1 deletion tests/bug00811.phpt
Expand Up @@ -41,7 +41,7 @@ new ArrayObject("fasdfdsaf", "fasdf", "fasdf");
<br />
<font size='1'><table class='xdebug-error xe-uncaught-exception' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: Uncaught%sin %sbug00811.php on line <i>9</i></th></tr>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> %s: ArrayObject::__construct() expects parameter 2 to be %r(long|integer)%r, string given in %sbug00811.php on line <i>9</i></th></tr>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> %s: ArrayObject::__construct() expects parameter 2 to be %r(long|integer|int)%r, string given in %sbug00811.php on line <i>9</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug00811.php' bgcolor='#eeeeec'>...%sbug00811.php<b>:</b>0</td></tr>
Expand Down
1 change: 1 addition & 0 deletions tests/vardump-overload-cli.phpt
Expand Up @@ -25,6 +25,7 @@ var_dump($array);

ini_set('xdebug.cli_color', 2);
var_dump($array);
?>
--EXPECT--
array(3) {
[0] =>
Expand Down
6 changes: 3 additions & 3 deletions tests/xdebug_debug_zval-php71-nts.phpt
Expand Up @@ -37,9 +37,9 @@ function func(){

func();
?>
--EXPECT--
a: (refcount=0, is_ref=0)='hoge'
$a: (refcount=0, is_ref=0)='hoge'
--EXPECTF--
a: (refcount=%d, is_ref=0)='hoge'
$a: (refcount=%d, is_ref=0)='hoge'
$b: (refcount=1, is_ref=0)=array ('a' => (refcount=0, is_ref=0)=4, 'b' => (refcount=2, is_ref=1)=5, 'c' => (refcount=0, is_ref=0)=6, 0 => (refcount=0, is_ref=0)=8, 1 => (refcount=0, is_ref=0)=9)
$b['a']: (refcount=0, is_ref=0)=4
$b['b']: (refcount=2, is_ref=1)=5
Expand Down
6 changes: 3 additions & 3 deletions tests/xdebug_debug_zval_stdout-php71-nts.phpt
Expand Up @@ -37,9 +37,9 @@ function func(){

func();
?>
--EXPECT--
a: (refcount=0, is_ref=0)='hoge'
$a: (refcount=0, is_ref=0)='hoge'
--EXPECTF--
a: (refcount=%d, is_ref=0)='hoge'
$a: (refcount=%d, is_ref=0)='hoge'
$b: (refcount=1, is_ref=0)=array ('a' => (refcount=0, is_ref=0)=4, 'b' => (refcount=2, is_ref=1)=5, 'c' => (refcount=0, is_ref=0)=6, 0 => (refcount=0, is_ref=0)=8, 1 => (refcount=0, is_ref=0)=9)
$b['a']: (refcount=0, is_ref=0)=4
$b['b']: (refcount=2, is_ref=1)=5
Expand Down
4 changes: 2 additions & 2 deletions xdebug.c
Expand Up @@ -76,7 +76,7 @@ void (*xdebug_old_execute_internal)(zend_execute_data *current_execute_data, zva
void xdebug_execute_internal(zend_execute_data *current_execute_data, zval *return_value);

/* error callback replacement functions */
void (*xdebug_old_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
void (*xdebug_old_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0);
void (*xdebug_new_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
void xdebug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);

Expand Down Expand Up @@ -1936,7 +1936,7 @@ void xdebug_execute_internal(zend_execute_data *current_execute_data, zval *retu
int function_nr = 0;

int restore_error_handler_situation = 0;
void (*tmp_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) = NULL;
void (*tmp_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0) = NULL;

XG(level)++;
if ((signed long) XG(level) > XG(max_nesting_level) && (XG(max_nesting_level) != -1)) {
Expand Down

0 comments on commit f95bc22

Please sign in to comment.