Plugin not returning value correctly & causing fatal error.
-
Hey there, while debugging an issue from one of our users we found that your plugin is currently not returning a value from one of your hooked filters.
In the following function, you are conditionally returning a value. This should probably always return the
$plugins_array
even if you aren’t changing it.It’s located in:
/wp-front-end-profile/admin/class-wpfep-shortcodes-button.php:96
We have confirmed that returning the array fixes the Fatal errors thrown in our plugins as well.
This likely has impacts on other plugins as well until it’s resolved.
The full filter function should probably be:
public function enqueue_plugin_scripts($plugin_array) { global $pagenow; $posttype = get_post_type(get_the_ID()); if (('page' === $posttype && 'post.php' === $pagenow) || ('page' === $posttype && 'post-new.php' === $pagenow)) { // enqueue TinyMCE plugin script with its ID. $plugin_array['wpfep_button'] = plugins_url('/assets/js/wpfep-tmc-button.js', dirname(__FILE__)); return $plugin_array; } return $plugin_array; }
- The topic ‘Plugin not returning value correctly & causing fatal error.’ is closed to new replies.