PHP notices
-
Hi there,
First of all, thanks for the plugin.
In your code, you’re calling your dynamic class methods statically. This produces a lot of PHP notices. I would be great if you could fix these.
For instance:
PHP Deprecated: Non-static method LightboxPhotoSwipe::cleanupDatabase() should not be called statically in /data/wordpress/htdocs/wordpress/wp-includes/class-wp-hook.php on line 286
I haven’t really gone through your code, but the fix would be to either declare your methods static, or, instead of using
get_class()
in youradd_action()
callbacks, simply use$this
.Change:
add_action('lbwps_cleanup', array(get_class($this), 'cleanupDatabase'));
to:
add_action('lbwps_cleanup', array($this, 'cleanupDatabase'));
Thanks!
- The topic ‘PHP notices’ is closed to new replies.