|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-07-08 23:45 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2015-07-08 23:45 UTC] requinix@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 01:00:01 2025 UTC |
Description: ------------ try does not catch Test script: --------------- <?php $d=new DOMDocument(); $d->loadHTML('<html></html>'); $p=new DOMXPath($d); try{ $p->query('//html/head')->item(0)->getAttribute('rel'); }catch(Exception $e){ print('Catched'); } ?> Expected result: ---------------- Catched Actual result: -------------- Fatal error: Call to a member function getAttribute() on null in C:\htdocs\test.pl\1.php on line 11