|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-08-21 20:04 UTC] vhu at iki dot fi
[2018-08-21 21:21 UTC] cmb@php.net
[2018-08-21 21:25 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2018-08-22 10:56 UTC] cmb@php.net
[2018-08-22 10:56 UTC] cmb@php.net
-Status: Verified
+Status: Closed
[2018-08-22 10:57 UTC] cmb@php.net
-Assigned To:
+Assigned To: cmb
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ First parameter of the libxml_set_external_entity_loader() callback is undefined if argument passed to it is null. Test script: --------------- <?php ini_set('error_reporting',PHP_INT_MAX-1); $xml=<<<EOF <?xml version="1.0"?> <test/> EOF; $xsd=<<<EOF <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:include schemaLocation="nonexistent.xsd"/> <xs:element name="test"/> </xs:schema> EOF; libxml_set_external_entity_loader(function($p,$s,$c) { var_dump($p,$s,$c); die(); }); $dom=new DOMDocument($xml); var_dump($dom->schemaValidateSource($xsd)); Expected result: ---------------- NULL string(15) "nonexistent.xsd" array(4) { ["directory"]=> NULL ["intSubName"]=> NULL ["extSubURI"]=> NULL ["extSubSystem"]=> NULL } Actual result: -------------- Notice: Undefined variable: p in /home/huge/test.php on line 17 NULL string(15) "nonexistent.xsd" array(4) { ["directory"]=> NULL ["intSubName"]=> NULL ["extSubURI"]=> NULL ["extSubSystem"]=> NULL }