felipe                                   Sun, 03 Jul 2011 01:06:20 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=312831

Log:
- Fixed crash when using -e option

Changed paths:
    U   php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c
    U   php/php-src/trunk/sapi/fpm/fpm/fpm_main.c

Modified: php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c        2011-07-03 
00:35:53 UTC (rev 312830)
+++ php/php-src/branches/PHP_5_4/sapi/fpm/fpm/fpm_main.c        2011-07-03 
01:06:20 UTC (rev 312831)
@@ -1569,7 +1569,7 @@
 int main(int argc, char *argv[])
 {
        int exit_status = SUCCESS;
-       int cgi = 0, c;
+       int cgi = 0, c, use_extended_info = 0;
        zend_file_handle file_handle;

        /* temporary locals */
@@ -1678,7 +1678,7 @@
                                break;

                        case 'e': /* enable extended info output */
-                               CG(compiler_options) |= 
ZEND_COMPILE_EXTENDED_INFO;
+                               use_extended_info = 1;
                                break;

                        case 't':
@@ -1781,6 +1781,10 @@
 #endif
                return FAILURE;
        }
+
+       if (use_extended_info) {
+               CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
+       }

        /* check force_cgi after startup, so we have proper output */
        if (cgi && CGIG(force_redirect)) {

Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c
===================================================================
--- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c   2011-07-03 00:35:53 UTC (rev 
312830)
+++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c   2011-07-03 01:06:20 UTC (rev 
312831)
@@ -1569,7 +1569,7 @@
 int main(int argc, char *argv[])
 {
        int exit_status = SUCCESS;
-       int cgi = 0, c;
+       int cgi = 0, c, use_extended_info = 0;
        zend_file_handle file_handle;

        /* temporary locals */
@@ -1678,7 +1678,7 @@
                                break;

                        case 'e': /* enable extended info output */
-                               CG(compiler_options) |= 
ZEND_COMPILE_EXTENDED_INFO;
+                               use_extended_info = 1;
                                break;

                        case 't':
@@ -1781,6 +1781,10 @@
 #endif
                return FAILURE;
        }
+
+       if (use_extended_info) {
+               CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
+       }

        /* check force_cgi after startup, so we have proper output */
        if (cgi && CGIG(force_redirect)) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to