Open presswizards opened 7 years ago
+1
We are working on this.
+1 plugin users raising support issues on this
@vovafeldman what about using PHP magic methods to remove this now? The following during my testing won't trigger PHP 7 notices, but should theoretically work the same.
public function __call( $method, $args ) {
if ( $method == '__fs' ) {
// Do translation here.
}
}
For reference: http://php.net/manual/en/language.oop5.overloading.php#object.call
@danieliser as far as I know magic methods are for classes, the __fs()
is a global function, not a class' method.
Actual Behavior:
What is the issue? (*)
PHP v7 warnings in SDKWhat is the expected behavior?
No warningsFrom a recent support thread regarding SDK and PHP 7.0:
PHP 7 warning: Function name “__fs” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
"Ran the PHP 7.0 Compatibility Checker plugin that can be found here https://wordpress.org/plugins/php-compatibility-checker/
FILE: …./wp-content/plugins/pluginname/includes/freemius/includes/fs-essential-functions.php ——————————————————————————————————————————————— FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ——————————————————————————————————————————————— 165 | WARNING | Function name “__fs” is discouraged; PHP has reserved all method names with a double underscore prefix for future use ———————————————————————————————————————————————