-
Notifications
You must be signed in to change notification settings - Fork 89
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
Deprecation warning in jsmin.php #416
Comments
can you confirm this fixes the deprecation warning @chesio ? |
@futtta Unfortunately, it does not. This fix is incomplete, it has been reported in upstream repo as well: mrclay/jsmin-php#16 Would it make sense to update the whole library? It seems Autoptimize bundles version 2.3.2, while upstream has 2.4.3 as most recent: https://github.com/mrclay/jsmin-php/blob/master/CHANGELOG.md |
made a small tweak to the current version, can you re-test @chesio some of the changes in 2.4.3 are already in "my" version (which is different from the original 2.3.2), but it might indeed be time to go to the latest JSmin version. :-) |
@futtta I apologize, I should have been more explicit in my previous comments. While the patch prevents one possible source of the deprecation message it does not fix the problem I reported, because autoptimize/classes/external/php/jsmin.php Lines 388 to 390 in 67c3e53
On line 388 As far as I can tell, this has been fixed upstream in mrclay/jsmin-php@a688631 The fix does not prevent |
arghhhh ... no use in trying put band-aids on the old code, I'll have to bite the bullet. more soon :) |
reopening so we can test ;-) @chesio had to make some small tweaks, but this is 99% of jsmin.php, can you test to confirm this fixes the issues you were facing? |
@futtta Sorry for keeping you waiting so long. I have now tested the beta branch and I don't get the deprecation warnings anymore! 👍 |
PHP Deprecated: ord(): Passing null to parameter #1 ($character) of type string is deprecated in /var/www/naturfuehrer/wordpress/wp-content/plugins/autoptimize/classes/external/php/jsmin.php on line 390
The reason seems to be that
JSMin::get()
method despite having@return string
signature...autoptimize/classes/external/php/jsmin.php
Lines 319 to 325 in 67c3e53
...can actually return
null
as well:autoptimize/classes/external/php/jsmin.php
Lines 338 to 340 in 67c3e53
EDIT: I was too quick... There is another path that returns
null
in this method (and triggers the warning above):autoptimize/classes/external/php/jsmin.php
Lines 329 to 337 in 67c3e53
The text was updated successfully, but these errors were encountered: