]> granicus.if.org Git - php/commitdiff
react only on CORE_ERROR
authorStanislav Malyshev <stas@php.net>
Sun, 2 Jul 2000 16:36:31 +0000 (16:36 +0000)
committerStanislav Malyshev <stas@php.net>
Sun, 2 Jul 2000 16:36:31 +0000 (16:36 +0000)
main/main.c

index aed9adf05d1472e847ed67e0d9042492f9a60084..2cc9dcfac8129cce83860c4cd32c160877c93cbf 100644 (file)
@@ -417,17 +417,19 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
        }
 
        switch (type) {
-               case E_ERROR:
                case E_CORE_ERROR:
+                       if(!module_initialized) {
+                               /* bad error in module startup - no way we can live with this */
+                               exit(-2);
+                       }
+               /* no break - intentionally */
+               case E_ERROR:
                /*case E_PARSE: the parser would return 1 (failure), we can bail out nicely */
                case E_COMPILE_ERROR:
                case E_USER_ERROR:
                        if (module_initialized) {
                                zend_bailout();
                                return;
-                       } else {
-                               /* bad error in module startup - no way we can live with this */
-                               exit(-2);
                        }
                        break;
        }