My wordpress site indicates an undefined array on line 1001 & 1004 of plugin.php:
**1001** if ( is_object( $callback[0] ) ) {
// Object class calling.
return spl_object_hash( $callback[0] ) . $callback[1];
**1004** } elseif ( is_string( $callback[0] ) ) {
// Static calling.
return $callback[0] . '::' . $callback[1];
}
My wordpress child theme’s functions.php code is this:
<?php
add_action( `wp_enqueue_scripts`, `theme_enqueue_styles`);
function theme_enqueue_styles() {
wp_enqueue_style( `parent-style`, get_template_directory_uri() . `/style.css`);
}
How can i modify it? The errors only appeared when I activated my child theme, so I figured that’s where the problem is. My child theme only has a css file and the functions.php…
I tried to deactivate all plugins since the error said it came from plugin.php at first, it didn’t work
I tried modifying the code of plugin.php to this
if (is_string($callback[0]) || is_object($callback[0])) {
// Static or object calling.
return $callback[0] . '::' . $callback[1];
} else {
// Object class calling.
return spl_object_hash($callback[0]) . $callback[1];
}
made everything worse
I don’t know much php so I would rather ask. Thank you for your help