Skip to content

Commit

Permalink
- Remove checking for "previous" in PHP < 5.2, because it doesn't exi…
Browse files Browse the repository at this point in the history
…st there.

SVN Rev: 3186
  • Loading branch information
derickr committed Jan 1, 2010
1 parent ccbac9d commit 1344e5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xdebug.c
Expand Up @@ -2547,13 +2547,15 @@ void xdebug_throw_exception_hook(zval *exception TSRMLS_DC)
php_error(E_ERROR, "Your exception class uses incorrect types for common properties: 'message' and 'file' need to be a string and 'line' needs to be an integer.");
}

#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION >= 6
previous_exception = zend_read_property(default_ce, exception, "previous", sizeof("previous")-1, 1 TSRMLS_CC);
if (previous_exception && Z_TYPE_P(previous_exception) != IS_NULL) {
xdebug_message_trace = zend_read_property(default_ce, previous_exception, "xdebug_message", sizeof("xdebug_message")-1, 1 TSRMLS_CC);
if (xdebug_message_trace && Z_TYPE_P(xdebug_message_trace) != IS_NULL) {
xdebug_str_add(&tmp_str, Z_STRVAL_P(xdebug_message_trace), 0);
}
}
#endif
if (!PG(html_errors)) {
xdebug_str_addl(&tmp_str, "\n", 1, 0);
}
Expand Down

0 comments on commit 1344e5e

Please sign in to comment.