helly Tue Jan 22 20:42:22 2008 UTC
Added files: (Branch: PHP_5_3)
/php-src/ext/simplexml/tests bug37076.phpt
Modified files:
/php-src NEWS
/php-src/ext/simplexml simplexml.c
Log:
- MFH Bugfix #37076 (SimpleXML ignores .=). (felipe, marcus)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.83&r2=1.2027.2.547.2.965.2.84&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.83
php-src/NEWS:1.2027.2.547.2.965.2.84
--- php-src/NEWS:1.2027.2.547.2.965.2.83 Tue Jan 22 09:27:46 2008
+++ php-src/NEWS Tue Jan 22 20:42:21 2008
@@ -126,6 +126,7 @@
- Fixed bug #37964 (Reflection shows private methods of parent class).
(Felipe, Marcus)
- Fixed bug #37911 (preg_replace_callback() ignores named groups). (Nuno)
+- Fixed bug #37076 (SimpleXML ignores .=). (Felipe, Marcus)
- Fixed bug #36128 (Interbase PDO - timestamp columns return NULL). (Lars W)
- Fixed bug #35386 (firebird: first row is null). (Lars W)
- Fixed bug #35163 (Array elements can lose references). (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.35.2.6&r2=1.151.2.22.2.35.2.7&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.6
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.7
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.6 Mon Dec 31
07:17:13 2007
+++ php-src/ext/simplexml/simplexml.c Tue Jan 22 20:42:21 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simplexml.c,v 1.151.2.22.2.35.2.6 2007/12/31 07:17:13 sebastian Exp $
*/
+/* $Id: simplexml.c,v 1.151.2.22.2.35.2.7 2008/01/22 20:42:21 helly Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -711,11 +711,13 @@
convert_to_string(member);
name = Z_STRVAL_P(member);
node = sxe_get_element_by_name(sxe, node, &name, &type TSRMLS_CC);
- if (!node) {
- sxe_prop_dim_write(object, member, NULL, 1, 0, &node TSRMLS_CC);
- type = SXE_ITER_NONE;
- name = NULL;
+ if (node) {
+ return NULL;
}
+ sxe_prop_dim_write(object, member, NULL, 1, 0, &node TSRMLS_CC);
+ type = SXE_ITER_NONE;
+ name = NULL;
+
MAKE_STD_ZVAL(return_value);
_node_as_zval(sxe, node, return_value, type, name, sxe->iter.nsprefix,
sxe->iter.isprefix TSRMLS_CC);
@@ -2494,7 +2496,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.35.2.6
$");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.35.2.7
$");
php_info_print_table_row(2, "Schema support",
#ifdef LIBXML_SCHEMAS_ENABLED
"enabled");
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug37076.phpt?view=markup&rev=1.1
Index: php-src/ext/simplexml/tests/bug37076.phpt
+++ php-src/ext/simplexml/tests/bug37076.phpt
--TEST--
Bug #37076 (SimpleXML ignores .=)
--FILE--
<?php
$xml = simplexml_load_string("<root><foo /></root>");
$xml->foo = "foo";
$xml->foo .= "bar";
print $xml->asXML();
?>
===DONE===
--EXPECT--
<?xml version="1.0"?>
<root><foo>foobar</foo></root>
===DONE===
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php