]> granicus.if.org Git - php/commitdiff
Fixed bug#46811 ini_set() doesn't return false on failure
authorHannes Magnusson <bjori@php.net>
Tue, 9 Dec 2008 10:08:15 +0000 (10:08 +0000)
committerHannes Magnusson <bjori@php.net>
Tue, 9 Dec 2008 10:08:15 +0000 (10:08 +0000)
Zend/tests/bug46811.phpt [new file with mode: 0644]
Zend/zend_ini.c

diff --git a/Zend/tests/bug46811.phpt b/Zend/tests/bug46811.phpt
new file mode 100644 (file)
index 0000000..06e10d7
--- /dev/null
@@ -0,0 +1,13 @@
+--TEST--
+ini_set() function
+--INI--
+arg_separator.output=&
+--FILE--
+<?php
+var_dump(ini_set("arg_separator.output", ""));
+var_dump(ini_get("arg_separator.output"));
+?>
+--EXPECT--
+bool(false)
+string(1) "&"
+
index 18a360d1906e09470e6492dafa5208c3a14cb135..1e9e10866fb5888fe61042f20236f5475b352cf5 100644 (file)
@@ -292,6 +292,7 @@ ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_val
                ini_entry->value_length = new_value_length;
        } else {
                efree(duplicate);
+               return FAILURE;
        }
 
        return SUCCESS;