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
This commit is contained in:
Arnout Boks 2017-01-10 21:19:37 +01:00 committed by Nikita Popov
parent 291e3f0762
commit 07340553a5
4 changed files with 29 additions and 4 deletions

3
NEWS
View File

@ -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)

View File

@ -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;
}

View File

@ -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
)

View File

@ -61,9 +61,7 @@ object(DOMException)#%d (7) {
["args"]=>
array(1) {
[0]=>
Warning: var_dump(): %s
DOMAttr
DOMAttr
}
}
}