From fff675c4488b4debaa3d19fac04cc4cf042b303c Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sat, 24 Jul 1999 20:36:31 +0000 Subject: [PATCH] Congrats Andrey --- ChangeLog | 2 ++ main/main.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 35fc78e52ab..302daada1f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ PHP 4.0 CHANGE LOG ChangeLog ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ??? ?? 1999, Version 4.0 Beta 2 +- Fixed a problem with the PHP error handler that could result in a crash + on certain operating systems (Zeev) - Apache php_flag values only recognized 'On' (case sensitive) - changed to case insensitive (Zeev) - Fixed a memory leak with switch statement containing return statements diff --git a/main/main.c b/main/main.c index 361a3c68535..6c0db41cd96 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;