]> 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:11:21 +0000 (10:11 +0000)
committerHannes Magnusson <bjori@php.net>
Tue, 9 Dec 2008 10:11:21 +0000 (10:11 +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 5979e67fb1445e933bdabadf98c734285d58b648..ba285d4c465304642cf4f6c47a17456f128810d1 100644 (file)
@@ -291,6 +291,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;