[xdebug-dev] xdebug xdebug/xdebug.c - Make this compile with PHP 5.3 and HEAD again. (Patch by Etienne Kneus)

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Thu, 13 Mar 2008 15:06:57 +0100

Date: Thu Mar 13 15:06:57 CET 2008
User: Derick Rethans
Directory: xdebug

Log Message:
[0.25]
- Make this compile with PHP 5.3 and HEAD again. (Patch by Etienne Kneus)

Modified files:
           xdebug/xdebug.c (version: 1.420)

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.419
retrieving revision 1.420
diff -u -r1.419 -r1.420
--- xdebug/xdebug.c:1.419 Tue Feb 19 15:57:32 2008 GMT
+++ xdebug/xdebug.c Thu Mar 13 13:06:57 2008 GMT
@@ -2340,6 +2340,10 @@
         char *buffer, *error_type_str;
         int buffer_len;
         xdebug_brk_info *extra_brk_info = NULL;
+#if PHP_MAJOR_VERSION >= 5
+ error_handling_t error_handling;
+ zend_class_entry *exception_class;
+#endif
 
         TSRMLS_FETCH();
 
@@ -2364,8 +2368,15 @@
 #endif
 
 #if PHP_MAJOR_VERSION >= 5
+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3) || PHP_MAJOR_VERSION >= 6
+ error_handling = EG(error_handling);
+ exception_class = EG(exception_class);
+#else
+ error_handling = PG(error_handling);
+ exception_class = PG(exception_class);
+#endif
         /* according to error handling mode, suppress error, throw exception or show it */
- if (PG(error_handling) != EH_NORMAL) {
+ if (error_handling != EH_NORMAL) {
                 switch (type) {
                         case E_CORE_ERROR:
                         case E_COMPILE_ERROR:
@@ -2383,11 +2394,11 @@
                                 /* throw an exception if we are in EH_THROW mode
                                  * but DO NOT overwrite a pending exception
                                  */
- if (PG(error_handling) == EH_THROW && !EG(exception)) {
+ if (error_handling == EH_THROW && !EG(exception)) {
 #if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1) || PHP_MAJOR_VERSION >= 6
- zend_throw_error_exception(PG(exception_class), buffer, 0, type TSRMLS_CC);
+ zend_throw_error_exception(exception_class, buffer, 0, type TSRMLS_CC);
 #else
- zend_throw_exception(PG(exception_class), buffer, 0 TSRMLS_CC);
+ zend_throw_exception(exception_class, buffer, 0 TSRMLS_CC);
 #endif
                                 }
                                 efree(buffer);
Received on Thu Mar 13 2008 - 15:15:40 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST