Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing warning when blocking entity loading via libxml_set_external_entity_loader #11952

Closed
nielsdos opened this issue Aug 12, 2023 · 0 comments

Comments

@nielsdos
Copy link
Member

Description

The following code:

<?php

libxml_set_external_entity_loader(function ($public_id, $system_id, $context) {
    return null;
});

$doc = new DOMDocument;
$doc->loadHTMLFile("foobar");

Resulted in this output:

Warning: DOMDocument::loadHTMLFile(): Failed to load external entity "NULL" in %s on line %d

But I expected something less confusing. Now it sounds like it tries to load a file named "NULL" but that is not the case. It just complains in a weird way.
Low priority issue though.

PHP Version

8.1+

Operating System

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant