-
Notifications
You must be signed in to change notification settings - Fork 327
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
PHP 7.2: "__autoload() is deprecated, use spl_autoload_register() instead" #154
Comments
OK! I'll take a patch that does this. |
which? dropping the fallback or separating it out? |
Separating it out please! |
@ezyang kindly can we have release for this so we can update our project with composer update |
OK, one of these days :) |
Anything we can do to help speed up getting a new build? HTMLPurifier is essentially broken on PHP 7.2 presently, which is general release and thus has to be supported in most projects. |
4.10.0 is out. |
replace line 45 with spl_autoload_register(function($class) { |
Auto load classes1. OLD WAY EXAMPLE
2. NEW WAY EXAMPLE
|
The mere presence of the
__autoload
function definition, even inside the conditional, seems to raise this warning on PHP 7.2. It's just a deprecation warning but it will crop up and cause problems for people running tests and things like that (where I saw it).Simply eliminating the __autoload fallback from HTMLPurifier.autoload.php
would quiet the complaint. As it's only support for ancient versions it might be prudent to do so.
Otherwise, I suppose you could split off the __autoload definition into a separate file that would only be conditionally
include
'd, thus making it so the problematic definition isn't visible when it's not needed.The text was updated successfully, but these errors were encountered: