From e24bb8c49290aa9a451a1d149747fc773ff3e229 Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Mon, 14 Feb 2000 15:36:45 +0000 Subject: [PATCH] @Re-introduced "none" for disabling auto_prepend/append_file (Stig) Made auto_prepend_file and auto_append_file accept "none" as parameter to disable, like in PHP 3.0. --- main/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main/main.c b/main/main.c index 73590bef1a..ee5e4bd05f 100644 --- a/main/main.c +++ b/main/main.c @@ -1107,7 +1107,8 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_ UpdateIniFromRegistry(primary_file->filename); #endif - if (PG(auto_prepend_file) && PG(auto_prepend_file)[0]) { + if (PG(auto_prepend_file) && PG(auto_prepend_file)[0] && + strncmp(PG(auto_prepend_file), "none", 4) != 0) { prepend_file.filename = PG(auto_prepend_file); prepend_file.free_filename = 0; prepend_file.type = ZEND_HANDLE_FILENAME; @@ -1115,7 +1116,8 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_ } else { prepend_file_p = NULL; } - if (PG(auto_append_file) && PG(auto_append_file)[0]) { + if (PG(auto_append_file) && PG(auto_append_file)[0] && + strncmp(PG(auto_prepend_file), "none", 4) != 0) { append_file.filename = PG(auto_append_file); append_file.free_filename = 0; append_file.type = ZEND_HANDLE_FILENAME; -- 2.50.1