From cd59acb4a010863d3e7ac4724acd5288bd25a7b7 Mon Sep 17 00:00:00 2001 From: SVN Migration Date: Sat, 24 Jul 1999 21:40:38 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'BEFORE_BIG_SYMBOL_CHANGE'. --- main/main.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'main/main.c') diff --git a/main/main.c b/main/main.c index 59d1a54b37..6c0db41cd9 100644 --- a/main/main.c +++ b/main/main.c @@ -359,6 +359,9 @@ PHPAPI void php3_error(int type, const char *format,...) error_filename = zend_get_compiled_filename(); error_lineno = CG(zend_lineno); + if (!error_filename) { + error_filename = zend_get_executed_filename(ELS_C); + } } break; case E_ERROR: @@ -372,6 +375,10 @@ PHPAPI void php3_error(int type, const char *format,...) error_lineno = 0; break; } + + if (!error_filename) { + error_filename = "Unknown"; + } if (EG(error_reporting) & type || (type & E_CORE)) { char *error_type_str; @@ -768,11 +775,10 @@ int php_module_startup(sapi_module_struct *sf) sapi_globals_struct *sapi_globals = ts_resource(sapi_globals_id); #endif #if (WIN32|WINNT) && !(USE_SAPI) - WORD wVersionRequested; + WORD wVersionRequested = MAKEWORD(2, 0); WSADATA wsaData; - - wVersionRequested = MAKEWORD(2, 0); #endif + ELS_FETCH(); SG(server_context) = NULL; SG(request_info).request_method = NULL; @@ -782,6 +788,8 @@ int php_module_startup(sapi_module_struct *sf) return SUCCESS; } + EG(error_reporting) = E_ALL & ~E_NOTICE; + sapi_module = *sf; zend_output_startup(); -- cgit v1.2.1