Bug #73982 [Opn]: DOMElement->tagName and DOMAttr->value don't work anymore
| From: | nikic@php.net | Date: | Mon, 23 Jan 2017 22:40:06 +0000 |
| Subject: | Bug #73982 [Opn]: DOMElement->tagName and DOMAttr->value don't work anymore | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206905@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73982&edit=1
ID: 73982
Updated by: nikic@php.net
Reported by: rgpublic at gmx dot net
Summary: DOMElement->tagName and DOMAttr->value don't work
anymore
Status: Open
Type: Bug
Package: DOM XML related
Operating System: Ubuntu 16.04.1 LTS
PHP Version: 7.1.1
Block user comment: N
Private report: N
New Comment:
https://3v4l.org/jlp6E => Output the same for all versions
>= 5.6.3.
Previous Comments:
------------------------------------------------------------------------
[2017-01-23 22:31:39] rgpublic at gmx dot net
Description:
------------
I'm using PHP 7.1.1 from Ondrej Sury PPA (https://launchpad.net/~ondrej/+ppa-packages).
I've already reported this bug over there and was told that it's an upstream bug
(https://github.com/oerdnj/deb.sury.org/issues/534).
The test script should output div<br />test<br />.
Doesnt work on 7.1.1. Can this bug be for real? A bit puzzled that this hasnt been caught during
some automated tests cause it's so obvious...
Test script:
---------------
<?php
$html=new DOMDocument();
$html->loadHTML('<div class="test">HALLO</div>');
$tags=$html->getElementsByTagName("div");
echo $tags[0]->tagName."<br />";
foreach ($tags[0]->attributes as $attr) {
echo $attr->value."<br />";
}
Expected result:
----------------
div<br />test<br />
Actual result:
--------------
(nothing!)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73982&edit=1