Support » Plugin: Snitch » Fatal error after install

  • Resolved Heiko Mamerow


    Hi Sergej,

    thank You for this great plugin!!!

    It is running wonderful on my localhost-wp-install, but on my webserver it will not run.

    After install, when i click somewhere (e.g. “activate the plugin” or elsewhere…), it comes to this error-message:

    Fatal error: Call to undefined function get_current_screen() in /home/www/wordpress/wp-content/plugins/snitch/inc/snitch_cpt.class.php on line 275

    My php-knowledge is not good enough to fix it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I found a workaround:

    I just delete something in line 275 and then the plugin is running fine.

    old line 275: (bring the error)
    if ( empty(get_current_screen()->id) OR get_current_screen()->id !== ‘edit-snitch’ OR empty($_GET[‘snitch_state_filter’]) ) {

    new line 275: (working fine)
    if ( empty($_GET[‘snitch_state_filter’]) ) {

    But beware: i dont know exact what i do. I just play a little bit… 😉

    Thanks. Fixed.

    I’d suggest to just abort if WP_INSTALLING or WP_INSTALLING_NETWORK is defined and true.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error after install’ is closed to new replies.