Bug #73982 [Opn->Csd]: DOMElement->tagName and DOMAttr->value don't work anymore

From: Date: Mon, 23 Jan 2017 22:52:36 +0000
Subject: Bug #73982 [Opn->Csd]: DOMElement->tagName and DOMAttr->value don't work anymore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206906@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 User updated by: rgpublic at gmx dot net Reported by: rgpublic at gmx dot net Summary: DOMElement->tagName and DOMAttr->value don't work anymore -Status: Open +Status: Closed 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: Really, really(!) crazy. It definitely didnt work this afternoon. I'm so sure because I was fighting all day with this and I needed to find a workaround for multiple websites to get them running again. They were even spitting out notices in the log like "Property tagName does not exist" etc. Hmm. Thanks a lot anyway. Didnt know about 3v4l.org. Bookmarked it and will test there before filing bugs in the future. Promised :-) Previous Comments: ------------------------------------------------------------------------ [2017-01-23 22:40:05] nikic@php.net https://3v4l.org/jlp6E => Output the same for all versions >= 5.6.3. ------------------------------------------------------------------------ [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

« previous php.bugs (#206906) next »