• Resolved rauchfahnemax

    (@rauchfahnemax)


    My Setup:

    WordPress-Version 6.4.3
    Aktives Theme: Modern (Version 2.6.1)
    Aktuelles Plugin: WP Statistics (Version 14.5.1)
    PHP-Version 8.0.28

    Ein Fehler vom Typ E_ERROR wurde in der Zeile 6 der Datei /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header/Useragent.php verursacht. Fehlermeldung: During class fetch: Uncaught ParseError: syntax error, unexpected identifier "?if" in /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header/Useragent/Os.php:341
    Stack trace:
    #0 /var/www/html/wp-content/plugins/polylang/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/html/w...')
    #1 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header/Useragent.php(6): Composer\Autoload\ClassLoader->loadClass('WhichBrowser\\An...')
    #2 /var/www/html/wp-content/plugins/polylang/vendor/composer/ClassLoader.php(576): include('/var/www/html/w...')
    #3 /var/www/html/wp-content/plugins/polylang/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/html/w...')
    #4 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header.php(85): Composer\Autoload\ClassLoader->loadClass('WhichBrowser\\An...')
    #5 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header.php(15): WhichBrowser\Analyser->analyseUserAgent('Mozilla/5.0 (Wi...')
    #6 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser.php(42): WhichBrowser\Analyser->analyseHeaders()
    #7 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Parser.php(56): WhichBrowser\Analyser->analyse()
    #8 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Parser.php(23): WhichBrowser\Parser->analyse('Mozilla/5.0 (Wi...', Array)
    #9 /var/www/html/wp-content/plugins/wp-statistics/includes/class-wp-statistics-user-agent.php(30): WhichBrowser\Parser->__construct('Mozilla/5.0 (Wi...')
    #10 /var/www/html/wp-content/plugins/wp-statistics/includes/class-wp-statistics.php(367): WP_STATISTICS\UserAgent::getUserAgent()
    #11 /var/www/html/wp-content/plugins/wp-statistics/includes/class-wp-statistics.php(124): WP_Statistics->instantiate()
    #12 /var/www/html/wp-includes/class-wp-hook.php(324): WP_Statistics->plugin_setup('')
    #13 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    #14 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #15 /var/www/html/wp-settings.php(506): do_action('plugins_loaded')
    #16 /var/www/html/wp-config.php(133): require_once('/var/www/html/w...')
    #17 /var/www/html/wp-load.php(50): require_once('/var/www/html/w...')
    #18 /var/www/html/wp-admin/admin-ajax.php(22): require_once('/var/www/html/w...')
    #19 {main}

    Here the log message:

    PHP Fatal error: During class fetch: Uncaught ParseError: syntax error, unexpected identifier “\x88if” in /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header/Useragent/Os.php:341\nStack trace:\n#0 /var/www/html/wp-content/plugins/polylang/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}(‘/var/www/html/w…’)\n#1 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header/Useragent.php(6): Composer\Autoload\ClassLoader->loadClass(‘WhichBrowser\\An…’)\n#2 /var/www/html/wp-content/plugins/polylang/vendor/composer/ClassLoader.php(576): include(‘/var/www/html/w…’)\n#3 /var/www/html/wp-content/plugins/polylang/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}(‘/var/www/html/w…’)\n#4 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header.php(85): Composer\Autoload\ClassLoader->loadClass(‘WhichBrowser\\An…’)\n#5 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header.php(15): WhichBrowser\Analyser->analyseUserAgent(‘Mozilla/5.0 (X1…’)\n#6 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser.php(42): WhichBrowser\Analyser->analyseHeaders()\n#7 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Parser.php(56): WhichBrowser\Analyser->analyse()\n#8 /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Parser.php(23): WhichBrowser\Parser->analyse(‘Mozilla/5.0 (X1…’, Array)\n#9 /var/www/html/wp-content/plugins/wp-statistics/includes/class-wp-statistics-user-agent.php(30): WhichBrowser\Parser->__construct(‘Mozilla/5.0 (X1…’)\n#10 /var/www/html/wp-content/plugins/wp-statistics/includes/class-wp-statistics.php(367): WP_STATISTICS\UserAgent::getUserAgent()\n#11 /var/www/html/wp-content/plugins/wp-statistics/includes/class-wp-statistics.php(124): WP_Statistics->instantiate()\n#12 /var/www/html/wp-includes/class-wp-hook.php(324): WP_Statistics->plugin_setup(”)\n#13 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)\n#14 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)\n#15 /var/www/html/wp-settings.php(506): do_action(‘plugins_loaded’)\n#16 /var/www/html/wp-config.php(133): require_once(‘/var/www/html/w…’)\n#17 /var/www/html/wp-load.php(50): require_once(‘/var/www/html/w…’)\n#18 /var/www/html/xmlrpc.php(31): require_once(‘/var/www/html/w…’)\n#19 {main} in /var/www/html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Analyser/Header/Useragent.php on line 6

    • This topic was modified 8 months, 2 weeks ago by rauchfahnemax. Reason: More information
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter rauchfahnemax

    (@rauchfahnemax)

    Well this one was weird, apperently there was a error, when coping over the new code.

    if (preg_match('/HP eStation/u', $ua)) {
    $this->data->device->manufacturer = 'HP';
    $this->data->device->model = 'eStation';
    $this->data->device->type = Constants\DeviceType::PRINTER;
    $this->data->device->identified |= Constants\Id::MATCH_UA;
    $this->data->device->generic = false;
    }
    }

    This is the snippet as it should have been, but the one i got was riddled with non-printable symbols. The problem was very clearly only in this one position.

    Thread Starter rauchfahnemax

    (@rauchfahnemax)

    Well, since this did not happen in my staging deployment, but did in the prod, this probably was a series of unfortunate events. Maybe WP could check some checksum?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal Error in 14.5.1’ is closed to new replies.