cvs: php4 /ext/standard basic_functions.c
| From: | Jani Taskinen | Date: | Tue, 13 Nov 2001 00:37:49 +0000 |
| Subject: | cvs: php4 /ext/standard basic_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8165@lists.php.net to get a copy of this message | ||
sniper Mon Nov 12 19:37:49 2001 EDT
Modified files:
/php4/ext/standard basic_functions.c
Log:
Fixed the wrong logic in ini_get_all() function.
Now it behaves same as how phpinfo() outputs the ini entries.
If there is a local value, then the global one is the 'original one' if
there is such. Otherwise global value is same as local. :)
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.419 php4/ext/standard/basic_functions.c:1.420
--- php4/ext/standard/basic_functions.c:1.419 Sun Nov 11 13:28:43 2001
+++ php4/ext/standard/basic_functions.c Mon Nov 12 19:37:49 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.419 2001/11/11 18:28:43 derick Exp $ */
+/* $Id: basic_functions.c,v 1.420 2001/11/13 00:37:49 sniper Exp $ */
#include "php.h"
#include "php_main.h"
@@ -2229,14 +2229,16 @@
MAKE_STD_ZVAL(option);
array_init(option);
- if(ini_entry->value) {
+ if(ini_entry->orig_value) {
+ add_assoc_stringl(option, "global_value", ini_entry->orig_value,
ini_entry->orig_value_length, 1);
+ } else if (ini_entry->value) {
add_assoc_stringl(option, "global_value", ini_entry->value,
ini_entry->value_length, 1);
} else {
add_assoc_null(option, "global_value");
}
- if(ini_entry->orig_value) {
- add_assoc_stringl(option, "local_value", ini_entry->orig_value,
ini_entry->orig_value_length, 1);
+ if(ini_entry->value) {
+ add_assoc_stringl(option, "local_value", ini_entry->value,
ini_entry->value_length, 1);
} else {
add_assoc_null(option, "local_value");
}