YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
MIT License
2.21k stars 403 forks source link

Deprecated error #538

Closed Denis82cz closed 1 year ago

Denis82cz commented 1 year ago

Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /home/wpresste/domeny/wptranslations.free.hr/wp-content/plugins/prettylink-preklad/plugin-update-checker/plugin-update-checker.php on line 760

What about that?

Thx

YahnisElsts commented 1 year ago

It looks like the plugin in question is using a pretty old version of plugin-update-checker. In the current version, the file plugin-update-checker.php doesn't even have a line 760.

(This is not a guarantee that the current version would not trigger some other deprecation notice in your case.)

Denis82cz commented 1 year ago

Sure, I'll check out the new version then.

I had $position = strpos($haystack, $needle); on this line, and I replaced it with the code $cachedResult = (strpos($pluginPath, chr($muPluginDir)) === 0);.

But I'll download your latest version, thank you :)