Open daigo75 opened 3 years ago
Further information
The issue seems to occur when one of the plugins that loads the Freemius SDK is installed via a symbolic link. The full path to the SDK doesn't match the one generated by function fs_fallback_to_newest_active_sdk()
and that causes the logic not to "see" the plugin that loaded the SDK.
The affected line is the following:
$is_sdk_exists = file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $sdk_relative_path . '/start.php' ) );
If the $sdk_relative_path resolves to a path outside WP_PLUGIN_DIR, due to the presence of as symbolic link, the call to file_exists()
fails.
Behavior: I ran some tests with several plugins that rely on this SDK and the following notice appears in the backend:
Notice: Undefined property: stdClass::$newest in /path/to//vendor/freemius/wordpress-sdk/start.php on line 284
All the plugins use the same framework version (2.4.2) and load the Freemius initialisation code the same way. Of course, the arguments passed to it would be different, but that's about it, the rest is an almost verbatim copy of the initialisation code.
It looks like, in some cases,
$fs_active_plugins->newest
is not initialised. I haven't been able to debug this in detail, though, due to other commitments.Versions: (*)
Freemius SDK Version:
2.4.2WordPress Version:
5.7.xPHP Version:
7.2-7.4Plugin / Theme: (*)
Name:
CartPopsSlug:
cartpopsFreemius ID:
7061