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

Deprecation error from Freemius #196

Closed
rubas opened this issue Apr 29, 2024 · 5 comments
Closed

Deprecation error from Freemius #196

rubas opened this issue Apr 29, 2024 · 5 comments

Comments

@rubas
Copy link

rubas commented Apr 29, 2024

The included library Freemius produces deprecation error as this function can return null, which gets picket up by wp_normalize_path and wp_is_stream.

Reference: https://github.com/TablePress/TablePress/blob/main/libraries/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php#L42

ErrorException: Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
#14 /wp/wp-includes/functions.php(2187): wp_normalize_path
#13 /wp/wp-includes/plugin.php(769): plugin_basename
#12 /app/mu-plugins/tablepress/libraries/freemius/start.php(181): require_once
#11 /app/mu-plugins/tablepress/tablepress.php(62): tb_tp_fs
#10 /app/mu-plugins/tablepress/tablepress.php(93): include_once
ErrorException: Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
#15 /wp/wp-includes/functions.php(7288): wp_is_stream
#14 /wp/wp-includes/functions.php(2180): wp_normalize_path
#13 /wp/wp-includes/plugin.php(769): plugin_basename
#12 /app/mu-plugins/tablepress/libraries/freemius/start.php(181): require_once
#11 /app/mu-plugins/tablepress/tablepress.php(62): tb_tp_fs
#10 /app/mu-plugins/tablepress/tablepress.php(93): include_once
@TobiasBg
Copy link
Member

Hi @rubas,

Thanks for also opening this issue in the Freemius repo! As this is where this needs to be fixed, I'll close this issue.
Once an updated version is available, that will be integrated into TablePress as well.

Best wishes,
Tobias

@rubas
Copy link
Author

rubas commented May 2, 2024

Hi @TobiasBg

there are a ton of similar issue open in the Freemius repo. I'm not sure, when those will be picked up and fixed...

As you are bundling and shipping the library with your plugin, it is - in my humble opinion - also in your responsibility to stay on top of this. Either in patching your shipped version or replacing it with alternatives.

We are not getting anything from the library Freemium, and honestly I don't want this code to be part of our installation.

👉🏻 I ask you kindly to stay on top of it and find a solution as I don't have a lot of trust in this being fixed upstream in a reasonable timeframe.

Thanks.

@TobiasBg
Copy link
Member

TobiasBg commented May 2, 2024

Hi @rubas,

Thanks for your feedback on this! From what I know, a rewrite and simplification in that SDK is already being worked on, also with improved compatibility with modern versions of PHP.

Now, what I find a bit confusing is why you are actually getting or seeing this deprecation error. So far, I have no been able to trigger that on my test sites... So, why is fs_find_direct_caller_plugin_file() returning null for you? Are you using a special setup for your plugins, like symlinking them or something like that?

Best wishes,
Tobias

@rubas
Copy link
Author

rubas commented May 2, 2024

Thanks.

Correct, our setup includes symlink. Those are handled by the plugin, it just returns null and this is picked up by the wp hooks, which later results in the warnings.

But I wasn't very keen to debug this further as this is a commercial product and not in any way related to the plugin functionality itself.

@TobiasBg
Copy link
Member

TobiasBg commented May 2, 2024

Hi,

ok, thanks for the those details. I'm also using symlinks for plugins while testing, but I guess that there are different possibilities and yours might not be picked up properly.

I will escalate this again with Freemius, but at this time don't have a solution, sorry. :-(

Best wishes,
Tobias

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

No branches or pull requests

2 participants