Call to undefined function EnableMediaReplace\ get_current_screen
-
Hi
I am getting the error
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function EnableMediaReplace\\get_current_screen() in /var/www/httpdocs/wp-content/plugins/enable-media-replace/classes/emr-plugin.php:263\nStack trace:\n#0 /var/www/httpdocs/wp-includes/class-wp-hook.php(288): EnableMediaReplace\\EnableMediaReplacePlugin->attachment_editor(Array, Object(WP_Post))\n#1 /var/www/httpdocs/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)\n#2 /var/www/httpdocs/wp-admin/includes/media.php(1883): apply_filters('attachment_fiel...', Array, Object(WP_Post))\n#3 /var/www/httpdocs/wp-includes/media.php(3573): get_compat_media_markup(30360, Array)\n#4 /var/www/httpdocs/wp-content/plugins/ts-visual-composer-extend/registrations/ts_vcsc_registrations_functions.php(263): wp_prepare_attachment_for_js(Object(WP_Post))\n#5 /var/www....'
running enable-media-replace 3.3.10 on php 7.3.15.
error appears to be here and looks to have been somewhat fixed but not cleaned up –
I delete the code
$current_screen = get_current_screen();
the issue is resolved.
diff:
--- a/www/httpdocs/wp-content/plugins/enable-media-replace/classes/emr-plugin.php 2020-03-03 14:44:44.797102948 +0000 +++ b/www/httpdocs/wp-content/plugins/enable-media-replace/classes/emr-plugin.php 2020-03-03 14:45:07.793228023 +0000 @@ -309,7 +309,6 @@ public function display_notices() { - $current_screen = get_current_screen(); $crtScreen = function_exists("get_current_screen") ? get_current_screen() : (object)array("base" => false);
- The topic ‘Call to undefined function EnableMediaReplace\ get_current_screen’ is closed to new replies.