cvs: ZendEngine2 / zend_ini.c /tests bug46811.phpt

[email protected] ("Hannes Magnusson")
Newsgroups php.zend-engine.cvs
Message-ID <cvsbjori1228817295@cvsserver>
bjori		Tue Dec  9 10:08:15 2008 UTC

  Added files:                 
    /ZendEngine2/tests	bug46811.phpt 

  Modified files:              
    /ZendEngine2	zend_ini.c 
  Log:
  Fixed bug#46811 ini_set() doesn't return false on failure
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.76&r2=1.77&diff_format=u
Index: ZendEngine2/zend_ini.c
diff -u ZendEngine2/zend_ini.c:1.76 ZendEngine2/zend_ini.c:1.77
--- ZendEngine2/zend_ini.c:1.76	Mon Jul  7 21:47:30 2008
+++ ZendEngine2/zend_ini.c	Tue Dec  9 10:08:13 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_ini.c,v 1.76 2008/07/07 21:47:30 scottmac Exp $ */
+/* $Id: zend_ini.c,v 1.77 2008/12/09 10:08:13 bjori Exp $ */
 
 #include "zend.h"
 #include "zend_qsort.h"
@@ -292,6 +292,7 @@
 		ini_entry->value_length = new_value_length;
 	} else {
 		efree(duplicate);
+		return FAILURE;
 	}
 
 	return SUCCESS;

http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug46811.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug46811.phpt
+++ ZendEngine2/tests/bug46811.phpt
--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) "&"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.