diff options
Diffstat (limited to 'sapi/phpdbg')
-rw-r--r-- | sapi/phpdbg/phpdbg_opcode.c | 2 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_utils.c | 6 | ||||
-rw-r--r-- | sapi/phpdbg/tests/exceptions_003.phpt | 2 | ||||
-rw-r--r-- | sapi/phpdbg/tests/stepping_001.phpt | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c index 4b3bf4c668..d066674b90 100644 --- a/sapi/phpdbg/phpdbg_opcode.c +++ b/sapi/phpdbg/phpdbg_opcode.c @@ -115,7 +115,7 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *opline) /*{{{ */ /* RESULT */ switch (opline->opcode) { case ZEND_CATCH: - if (opline->extended_value == ZEND_LAST_CATCH) { + if (opline->extended_value & ZEND_LAST_CATCH) { if (decode[2]) { efree(decode[2]); decode[2] = NULL; diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index cdee919f79..71194633ab 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -764,16 +764,16 @@ PHPDBG_API zend_bool phpdbg_check_caught_ex(zend_execute_data *execute_data, zen while (1) { zend_class_entry *ce; - if (!(ce = CACHED_PTR(Z_CACHE_SLOT_P(RT_CONSTANT(cur, cur->op1))))) { + if (!(ce = CACHED_PTR(cur->extended_value & ~ZEND_LAST_CATCH))) { ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(cur, cur->op1)), RT_CONSTANT(cur, cur->op1) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD); - CACHE_PTR(Z_CACHE_SLOT_P(RT_CONSTANT(cur, cur->op1)), ce); + CACHE_PTR(cur->extended_value & ~ZEND_LAST_CATCH, ce); } if (ce == exception->ce || (ce && instanceof_function(exception->ce, ce))) { return 1; } - if (cur->extended_value == ZEND_LAST_CATCH) { + if (cur->extended_value & ZEND_LAST_CATCH) { return 0; } diff --git a/sapi/phpdbg/tests/exceptions_003.phpt b/sapi/phpdbg/tests/exceptions_003.phpt index e78ff1d489..16920870c3 100644 --- a/sapi/phpdbg/tests/exceptions_003.phpt +++ b/sapi/phpdbg/tests/exceptions_003.phpt @@ -26,7 +26,7 @@ prompt> [L7 %s ECHO<1> "ok\n" 00009: } catch (Error $e) { prompt> ok [L7 %s FAST_RET ~%d try-catch(0) %s] -[L9 %s CATCH<1> "Error" $e %s] +[L9 %s CATCH<%d> "Error" $e %s] >00005: x(); 00006: } finally { 00007: print "ok\n"; diff --git a/sapi/phpdbg/tests/stepping_001.phpt b/sapi/phpdbg/tests/stepping_001.phpt index a7ab9e59aa..90b2e5573a 100644 --- a/sapi/phpdbg/tests/stepping_001.phpt +++ b/sapi/phpdbg/tests/stepping_001.phpt @@ -25,7 +25,7 @@ prompt> [L0 %s HANDLE_EXCEPTION 00005: } 00006: prompt> [L0 %s HANDLE_EXCEPTION %s] -[L9 %s CATCH<1> "Exception" $e %s] +[L9 %s CATCH<%d> "Exception" $e %s] >00008: foo(); 00009: } catch (Exception $e) { 00010: echo "ok"; |