From: Hannes Magnusson Date: Tue, 9 Dec 2008 10:08:15 +0000 (+0000) Subject: Fixed bug#46811 ini_set() doesn't return false on failure X-Git-Tag: php-5.4.0alpha1~191^2~4860 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eb36e683fc9a04c985104159769978922d193c1;p=php Fixed bug#46811 ini_set() doesn't return false on failure --- diff --git a/Zend/tests/bug46811.phpt b/Zend/tests/bug46811.phpt new file mode 100644 index 0000000000..06e10d78fa --- /dev/null +++ b/Zend/tests/bug46811.phpt @@ -0,0 +1,13 @@ +--TEST-- +ini_set() function +--INI-- +arg_separator.output=& +--FILE-- + +--EXPECT-- +bool(false) +string(1) "&" + diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 18a360d190..1e9e10866f 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -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;