plugin_action_links handler trashes links array
-
Your plugin_action_links filter handler “replace_plugin_edit_links()” in WPEditor.php (line 323) processes the input links array whether the call is related to your plugin or not. It initializes “$data” to an empty string and then later uses this as though it was an array to hold the (possibly) processed links which it then returns. I suspect earlier versions of PHP did a type conversion for you and masked the problem – the latest PHP does not type convert and you return a string instead of an array which trashes the links array for other plugins that need it further down the filter chain.
The fix is simple… change the initialization of $data on line 324 from
$data = '';
to
$data = array();
- The topic ‘plugin_action_links handler trashes links array’ is closed to new replies.