diff --git a/tests/bug01181.inc b/tests/bug01181.inc new file mode 100644 index 000000000..ac17b172b --- /dev/null +++ b/tests/bug01181.inc @@ -0,0 +1,23 @@ +getMessage(); +} +echo "Statement after try/catch\n"; +?> diff --git a/tests/bug01181.phpt b/tests/bug01181.phpt new file mode 100644 index 000000000..3c050fad8 --- /dev/null +++ b/tests/bug01181.phpt @@ -0,0 +1,42 @@ +--TEST-- +Test for bug #1181: Derived class with __get gets called on fetching base class private property +--SKIPIF-- + +--FILE-- +*BaseClass*private', + 'step_into', +); + +dbgpRun( $data, $commands ); +?> +--EXPECTF-- + + + +-> step_into -i 1 + + + +-> breakpoint_set -i 2 -t line -n 17 + + + +-> run -i 3 + + + +-> property_get -i 4 -n $test->*BaseClass*private + + + +-> step_into -i 5 + + diff --git a/xdebug_var.c b/xdebug_var.c index d011f66d7..9d94fffe4 100644 --- a/xdebug_var.c +++ b/xdebug_var.c @@ -524,6 +524,10 @@ static zval* fetch_zval_from_symbol_table(zval *parent, char* name, unsigned int retval_p = tmp_val; goto cleanup; } + + if (EG(exception)) { + zend_clear_exception(); + } } /* Then we try a public property */