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

From: Date: Mon, 23 Jan 2017 22:31:46 +0000
Subject: Bug #73982 [NEW]: DOMElement->tagName and DOMAttr->value don't work anymore
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206904@lists.php.net to get a copy of this message
From: rgpublic at gmx dot net Operating system: Ubuntu 16.04.1 LTS PHP version: 7.1.1 Package: DOM XML related Bug Type: Bug Bug description:DOMElement->tagName and DOMAttr->value don't work anymore 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 bug report at https://bugs.php.net/bug.php?id=73982&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73982&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73982&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73982&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73982&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73982&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73982&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73982&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73982&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73982&r=support Expected behavior: https://bugs.php.net/fix.php?id=73982&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73982&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73982&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73982&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73982&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73982&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73982&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73982&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73982&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73982&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73982&r=mysqlcfg

« previous php.bugs (#206904) next »