summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r--ext/standard/basic_functions.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 8a034491da..57a6c41334 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -5169,6 +5169,7 @@ PHP_FUNCTION(php_strip_whitespace)
file_handle.opened_path = NULL;
zend_save_lexical_state(&original_lex_state TSRMLS_CC);
if (open_file_for_scanning(&file_handle TSRMLS_CC) == FAILURE) {
+ zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
php_output_end(TSRMLS_C);
if (filename_type == IS_UNICODE) {
efree(filename);