[PATCH] Fix ‘Failed to Open Stream’ error
-
When using this plugin I was getting the following error:
Warning: fopen(/path/to/my-plugin/my-plugin.php) failed to open stream: No such file or directory in /path/to/wp-includes/functions.php on line 4784
This was caused by me activating a plugin on a site in my WP network, then deleting the plugin folder without first disabling the plugin again in that sites admin. Broadcast loops through all plugins in the ‘active_plugins’ option and grabs their plugin data.
The fix is simple. In /path/to/wp-content/plugins/threewp-broadcast/src/ThreeWP_Broadcast.php::get_plugin_info_array() method change
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_filename );to
$plugin_filepath = WP_PLUGIN_DIR . '/' . $plugin_filename; if ( !file_exists($plugin_filepath) ) continue; $plugin_data = get_plugin_data( $plugin_filepath );
The topic ‘[PATCH] Fix ‘Failed to Open Stream’ error’ is closed to new replies.