Passing null to parameter #3 ($subject) of type array|string is deprecated
-
Hello,
I’m getting an error code only on the Media page of the backend of the site.
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/customer/www/taylorgeospatial.org/public_html/wp-admin/includes/plugin.php on line 2092
No one with access to the site has edited the file. The code at that line is in bold below:
function get_plugin_page_hookname( $plugin_page, $parent_page ) {
global $admin_page_hooks;
$parent = get_admin_page_parent( $parent_page );
$page_type = 'admin';
if ( empty( $parent_page ) || 'admin.php' === $parent_page || isset( $admin_page_hooks[ $plugin_page ] ) ) {
if ( isset( $admin_page_hooks[ $plugin_page ] ) ) {
$page_type = 'toplevel';
} elseif ( isset( $admin_page_hooks[ $parent ] ) ) {
$page_type = $admin_page_hooks[ $parent ];
}
} elseif ( isset( $admin_page_hooks[ $parent ] ) ) {
$page_type = $admin_page_hooks[ $parent ];
}
$plugin_name = preg_replace( '!\.php!', '', $plugin_page );
return $page_type . '_page_' . $plugin_name;
}WordPress 6.3.1
PHP 8.1.22
What should I do here?
Thank you.
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Passing null to parameter #3 ($subject) of type array|string is deprecated’ is closed to new replies.