Skip to content

Commit 0734055

Browse files
aboksnikic
authored andcommitted
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
1 parent 291e3f0 commit 0734055

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ PHP NEWS
66
. Fixed bug #73876 (Crash when exporting **= in expansion of assign op).
77
(Sara)
88

9+
- Dom:
10+
. Fixed bug #61858 (DOMAttr debug info generates E_WARNING). (Arnout Boks)
11+
912
- GD:
1013
. Fixed bug #73893 (A hidden danger of death cycle in a function of gd). (cmb)
1114

ext/dom/attr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Since: DOM Level 3
213213
*/
214214
int dom_attr_schema_type_info_read(dom_object *obj, zval *retval)
215215
{
216-
php_error_docref(NULL, E_WARNING, "Not yet implemented");
216+
/* TODO */
217217
ZVAL_NULL(retval);
218218
return SUCCESS;
219219
}

ext/dom/tests/bug61858.phpt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
Bug #61858 DOMAttr debug info generates E_WARNING
3+
--SKIPIF--
4+
<?php
5+
require_once('skipif.inc');
6+
?>
7+
--FILE--
8+
<?php
9+
$doc = new DOMDocument();
10+
$doc->loadXML('<example a="b">Test</example>');
11+
12+
$example = $doc->getElementsByTagName('example')->item(0);
13+
$attr = $example->getAttributeNode('a');
14+
15+
var_dump($attr);
16+
print_r($attr);
17+
--EXPECTF--
18+
object(DOMAttr)#%d (%d) {
19+
%A
20+
}
21+
DOMAttr Object
22+
(
23+
%A
24+
)

ext/dom/tests/dom_set_attr_node.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ object(DOMException)#%d (7) {
6161
["args"]=>
6262
array(1) {
6363
[0]=>
64-
65-
Warning: var_dump(): %s
66-
DOMAttr
64+
DOMAttr
6765
}
6866
}
6967
}

0 commit comments

Comments
 (0)