From 88f63f066773d8a16241deb8132ba939a8f91c6b Mon Sep 17 00:00:00 2001 From: Arnout Boks Date: Tue, 10 Jan 2017 21:19:37 +0100 Subject: [PATCH] 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 --- ext/dom/attr.c | 2 +- ext/dom/tests/bug61858.phpt | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ext/dom/tests/bug61858.phpt diff --git a/ext/dom/attr.c b/ext/dom/attr.c index 40a10f2f3d79b..db7002900425c 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 0000000000000..ccdd0cd80c27d --- /dev/null +++ b/ext/dom/tests/bug61858.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #61858 DOMAttr debug info generates E_WARNING +--SKIPIF-- + +--FILE-- +loadXML('Test'); + +$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 +)