From a2fa9bbe848ab48d03370d9935d46ced5c6f3eb1 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 15 Jul 2007 14:15:02 +0000 Subject: [PATCH] Clear out last error & last error file information at the end of the request to ensure that they don't propogate to the next request --- main/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main/main.c b/main/main.c index e55f26c8eb6..5b0ccf6729f 100644 --- a/main/main.c +++ b/main/main.c @@ -1337,6 +1337,16 @@ void php_request_shutdown(void *dummy) } } zend_end_try(); + /* 6.5 free last error information */ + if (PG(last_error_message)) { + free(PG(last_error_message)); + PG(last_error_message) = NULL; + } + if (PG(last_error_file)) { + free(PG(last_error_file)); + PG(last_error_file) = NULL; + } + /* 7. Shutdown scanner/executor/compiler and restore ini entries */ zend_deactivate(TSRMLS_C);