diff options
author | Arnout Boks <arnoutboks@gmail.com> | 2017-01-10 21:19:37 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2017-01-10 23:24:34 +0100 |
commit | 07340553a562db2387c9995dce0c84dd9afba97e (patch) | |
tree | fc597a52c590dbec09682f9b481fcc9c38a127a9 | |
parent | 291e3f0762cab9e9639e0594aa0ab96359ba2530 (diff) | |
download | php-git-07340553a562db2387c9995dce0c84dd9afba97e.tar.gz |
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
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | ext/dom/attr.c | 2 | ||||
-rw-r--r-- | ext/dom/tests/bug61858.phpt | 24 | ||||
-rw-r--r-- | ext/dom/tests/dom_set_attr_node.phpt | 4 |
4 files changed, 29 insertions, 4 deletions
@@ -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 40a10f2f3d..db70029004 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 0000000000..ccdd0cd80c --- /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 a426a6f3f8..18c697710a 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 } } } |