com php-src: Fixed bug #61858 (DOMAttr debug info generates E_WARNING): NEWS ext/dom/attr.c ext/dom/tests/bug 61858.phpt
ext/dom/tests/dom_set_attr_node .phpt
| From: | Nikita Popov | Date: | Tue, 10 Jan 2017 22:24:34 +0000 |
| Subject: | com php-src: Fixed bug #61858 (DOMAttr debug info generates E_WARNING): NEWS ext/dom/attr.c ext/dom/tests/bug 61858.phpt ext/dom/tests/dom_set_attr_node .phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96677@lists.php.net to get a copy of this message | ||
Commit: 07340553a562db2387c9995dce0c84dd9afba97e
Author: Arnout Boks <arnoutboks@gmail.com> Tue, 10 Jan 2017 21:19:37 +0100
Committer: Nikita Popov <nikic@php.net> Tue, 10 Jan 2017 23:24:34 +0100
Parents: 291e3f0762cab9e9639e0594aa0ab96359ba2530
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=07340553a562db2387c9995dce0c84dd9afba97e
Log:
Fixed bug #61858 (DOMAttr debug info generates E_WARNING)
It seems fair to remove this warning, given that:
* it is not documented in the official documentation
* the $specified property, which has a similar 'not implemented' status,
also does not trigger a warning
* it apparently hinders quite a lot of people during debugging, judging by
the number of votes on the bug
Bugs:
https://bugs.php.net/61858
Changed paths:
M NEWS
M ext/dom/attr.c
A ext/dom/tests/bug61858.phpt
M ext/dom/tests/dom_set_attr_node.phpt
Diff:
diff --git a/NEWS b/NEWS
index fb75b00..a066036 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ PHP NEWS
. Fixed bug #73876 (Crash when exporting **= in expansion of assign op).
(Sara)
+- Dom:
+ . Fixed bug #61858 (DOMAttr debug info generates E_WARNING). (Arnout Boks)
+
- GD:
. Fixed bug #73893 (A hidden danger of death cycle in a function of gd). (cmb)
diff --git a/ext/dom/attr.c b/ext/dom/attr.c
index 40a10f2..db70029 100644
--- a/ext/dom/attr.c
+++ b/ext/dom/attr.c
@@ -213,7 +213,7 @@ Since: DOM Level 3
*/
int dom_attr_schema_type_info_read(dom_object *obj, zval *retval)
{
- php_error_docref(NULL, E_WARNING, "Not yet implemented");
+ /* TODO */
ZVAL_NULL(retval);
return SUCCESS;
}
diff --git a/ext/dom/tests/bug61858.phpt b/ext/dom/tests/bug61858.phpt
new file mode 100644
index 0000000..ccdd0cd
--- /dev/null
+++ b/ext/dom/tests/bug61858.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #61858 DOMAttr debug info generates E_WARNING
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+?>
+--FILE--
+<?php
+$doc = new DOMDocument();
+$doc->loadXML('<example a="b">Test</example>');
+
+$example = $doc->getElementsByTagName('example')->item(0);
+$attr = $example->getAttributeNode('a');
+
+var_dump($attr);
+print_r($attr);
+--EXPECTF--
+object(DOMAttr)#%d (%d) {
+%A
+}
+DOMAttr Object
+(
+%A
+)
diff --git a/ext/dom/tests/dom_set_attr_node.phpt b/ext/dom/tests/dom_set_attr_node.phpt
index a426a6f..18c6977 100644
--- a/ext/dom/tests/dom_set_attr_node..phpt
+++ b/ext/dom/tests/dom_set_attr_node.phpt
@@ -61,9 +61,7 @@ object(DOMException)#%d (7) {
["args"]=>
array(1) {
[0]=>
-
-Warning: var_dump(): %s
-DOMAttr
+ DOMAttr
}
}
}