WPIntell

Source evidence

Not PHP 7 Compliant

Simple Preview · support · 2017-08-24T14:29:00+00:00

mixedsentiment
lowseverity
0.51relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 16 rows with source links

12.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

14 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Chad Hayton resolved
We are running PHP 7.1 and are getting the following warning when running the Simple Preview plugin: Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Simple_Preview has a deprecated constructor in /app01/html/aaa_ncnu/wp-content/plugins/simple-preview/simple-preview.php on line 45 Can you please update the class constructor in the plugin so it uses the PHP 7-valid __construct() method instead of the old-style constructor method that uses the class name as the constructor? Instead of constructing the class like this: // Plugin startup function Simple_Preview() { if ( ! is_admin() ) { add_action('init', array(&$this, 'show_preview')); } else { register_activation_hook(__FILE__, array(&$this, 'init')); add_action('admin_menu', array(&$this, 'meta_box')); add_action('save_post', array(&$this, 'save_post')); } } We’d construct it like this: // Plugin startup function __construct() { if ( ! is_admin() ) { add_action('init', array(&$this, 'show_preview')); } else { register_activation_hook(__FILE__, array(&$this, 'init')); add_action('admin_menu', array(&$this, 'meta_box')); add_action('save_post', array(&$this, 'save_post')); } } This topic was modified 8 years, 9 months ago by Chad Hayton . Good catch. I’ll update that in the next release.

Comments

1 shown
Nagmay 2017-11-09T19:24:00+00:00

Good catch. I’ll update that in the next release.