Bug #77685 [NEW]: Property reflection fails for DOMElement::$firstChild

From: Date: Fri, 01 Mar 2019 06:59:42 +0000
Subject: Bug #77685 [NEW]: Property reflection fails for DOMElement::$firstChild
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219784@lists.php.net to get a copy of this message
From: gtisza at gmail dot com Operating system: PHP version: 7.3.2 Package: Reflection related Bug Type: Bug Bug description:Property reflection fails for DOMElement::$firstChild Description: ------------ Trying to use reflection for the firstChild property of a DOMElement throws a "Property DOMElement::$firstChild does not exist" ReflectionException. Live test: https://3v4l.org/oQWMn This is particularly disruptive when using PHPSpec, which wraps all property access into reflection checks. Test script: --------------- $doc = new DOMDocument; $doc->loadHTML('<html><body></body></html>'); $e = $doc->getElementsByTagname('html')->item(0); echo get_class($e->firstChild); // DOMElement new ReflectionProperty('DOMElement', 'firstChild'); // throws -- Edit bug report at https://bugs.php.net/bug.php?id=77685&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77685&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77685&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77685&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77685&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77685&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77685&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77685&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77685&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77685&r=support Expected behavior: https://bugs.php.net/fix.php?id=77685&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77685&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77685&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77685&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77685&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77685&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77685&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77685&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77685&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77685&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77685&r=mysqlcfg

« previous php.bugs (#219784) next »