Recently my website became too slow. After checking the nginx error log, I have found that for each page access, I am seeing this error
FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /wp-admin/includes/plugin.php on line 1784PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /wp-admin/includes/plugin.php on line 1784PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /wp-admin/includes/plugin.php on line 1784" while reading response header from upstream
Seems like its WordPress issue. But I am not really sure.
Help appreciated
Thanks!
]]>Lorsque je veux accéder au plugins ou widgets ou médiathèque ou bien ajouter un media ou un plugin je trouve les pages sous wp-admin ne fonctionnent pas, par exemple wp-admin/plugin.php, wp-admin/widgets.php, wp-admin/upload.php, wp-admin/option.php, wp-admin/media-new.php … ” Oops! That page can’t be found.”
Ainsi, lorsque je veux téléverser un ficher dans un article même pour une image de taille petit un message s’affiche: “Le serveur ne peut pas traiter l’image. Cela peut se produire si le serveur est occupé ou ne dispose pas de suffisamment de ressources pour terminer la tache. Téléverser une image plus petite peut aider. ”
]]>PHP Warning: Invalid argument supplied for foreach() in /server_ path/public_html/test/wp-admin/includes/plugin.php on line 1928
Is there something I can do to prevent this, or it has to be fixed in the WP core?
]]>Best Wishes!
]]>Plugin.php Line 206:
Function: function apply_filters( $tag, $value ) {
$wp_current_filter[] = $tag; <–this is where it breaks.
This is being called by a plugin that I doubt is the issue, but I don’t have enough knowledge of WordPress, to fully trace this back to know what value or what is causing the issue. The plugin has this function that generates the out of memory error.
public function has_many_the_content() {
global $wp_current_filter;
if ( count( array_keys( $wp_current_filter, 'the_content', true ) ) > 1 ) {
// More then one <code>the_content</code> in the stack.
return true;
}
return false;
}
Just throwing this out there, I use to get this out of memory error with several plugins until I add a snippet to remove the themes meta box, add_action('add_meta_boxes', 'remove_meta_boxes');
I had a theory that we had too many post “tags” count is 3,672 but I don’t know if that is a limit or issue. The theme had a custom meta box and the only thing I could guess is when it attempted to load all the tags it ran out of memory. When I remove the meta_boxes for each Post_Type, the page loaded and no issues. Now I don’t know if this is the same thing. I am getting the current error from background or page loads not from the admin side or editing.
I have searched and searched and think I have a one-off issue so I thought maybe some of you rock star WordPress people might be able to help me understand that function so I could at least trace back to the route cause of this.
I do appreciate any comments, like I said I am looking for advanced WordPress individuals who can just comment on what that function is and its scope. Thanks!
]]>Parse error: syntax error, unexpected ‘function’ (T_FUNCTION), expecting while (T_WHILE) in /home2/hatha/public_html/libertadfemenina.com/wp-includes/plugin.php on line 623
It happened after I made a backup on my website redirected the domain. The php version my hosting provider is running is 5.6
This are the lines of code:
function has_action($tag, $function_to_check = false) {
return has_filter($tag, $function_to_check);
}
I appreciate any help!
]]>Fatal error: Call to a member function add_filter() on array in /home/swanchri/public_html/wp-includes/plugin.php on line 111
The code at that section of plugin.php is as follows:
function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
global $wp_filter;
if ( ! isset( $wp_filter[ $tag ] ) ) {
$wp_filter[ $tag ] = new WP_Hook();
}
$wp_filter[ $tag ]->add_filter( $tag, $function_to_add, $priority, $accepted_args );
return true;
}
Warning: Illegal offset type in isset or empty in /home/mydomain/example.com/public_html/wp-includes/plugin.php on line 211
Warning: Cannot modify header information - headers already sent by (output started at /home/mydomain/example.com/public_html/wp-includes/plugin.php:211) in /home/mydomain/example.com/public_html/wp-includes/pluggable.php on line 1174
Every time I try to save changes made to the plugin on settings page, I get the above errors. I’m not sure if this is a plugin conflict or not. Just letting you know.
]]>Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘CZR_post_metas’ does not have a method ‘tc_set_post_metas_hooks’ in /home/content/72/9209272/html/wp-includes/plugin.php on line 524
-RJD
]]>