Whoops! There was an error.
JsonException (5)
Malformed UTF-8 characters, possibly incorrectly encoded JsonException thrown with message "Malformed UTF-8 characters, possibly incorrectly encoded" Stacktrace: #3 JsonException in /app/backend/misc.php:112 #2 json_decode in /app/backend/misc.php:112 #1 Misc:getWidget in /app/backend/misc.php:96 #0 Misc:handleWidget in /app/index.php:24
Stack frames (4)
3
JsonException
/backend/misc.php112
2
json_decode
/backend/misc.php112
1
Misc getWidget
/backend/misc.php96
0
Misc handleWidget
/index.php24
            if ($this->getGETArg ('widget')[0]) {
                $apiKey = $this->getGETArg ('api_key')[1];
                $widget = $this->getGETArg ('widget')[1];
                $widget = $this->getWidget ($widget);
                if ($auth->checkAPIKey ($apiKey)) {
                    $_GET = array_merge ($_GET, $widget);
                    return true;
                }
            }
            return false;
        }
 
        /**
         * @param $widget
         * @return mixed
         * @throws \Exception
         * TODO: Transfer to localDb class
         */
        public function getWidget($widget) {
            if (json_decode (base64_decode ($widget), true, 512, JSON_THROW_ON_ERROR) === NULL) {
                throw new Exception('Invalid widget base64 passed');
            }
 
            return json_decode (base64_decode ($widget), true);
        }
 
        /**
         * @param $dir
         * @return bool
         */
        public function deleteDirectory($dir) {
            if (!file_exists ($dir)) {
                return true;
            }
 
            if (!is_dir ($dir)) {
                return unlink ($dir);
            }
 
            foreach (scandir ($dir) as $item) {
Arguments
  1. "Malformed UTF-8 characters, possibly incorrectly encoded"
    
            if ($this->getGETArg ('widget')[0]) {
                $apiKey = $this->getGETArg ('api_key')[1];
                $widget = $this->getGETArg ('widget')[1];
                $widget = $this->getWidget ($widget);
                if ($auth->checkAPIKey ($apiKey)) {
                    $_GET = array_merge ($_GET, $widget);
                    return true;
                }
            }
            return false;
        }
 
        /**
         * @param $widget
         * @return mixed
         * @throws \Exception
         * TODO: Transfer to localDb class
         */
        public function getWidget($widget) {
            if (json_decode (base64_decode ($widget), true, 512, JSON_THROW_ON_ERROR) === NULL) {
                throw new Exception('Invalid widget base64 passed');
            }
 
            return json_decode (base64_decode ($widget), true);
        }
 
        /**
         * @param $dir
         * @return bool
         */
        public function deleteDirectory($dir) {
            if (!file_exists ($dir)) {
                return true;
            }
 
            if (!is_dir ($dir)) {
                return unlink ($dir);
            }
 
            foreach (scandir ($dir) as $item) {
Arguments
  1. b"{"controller":"apps","action":"assessment"}\rÃÜ"
    
  2. true
    
  3. 512
    
  4. 4194304
    
                } else {
                    $inner = $this->parseMenu ($item['children'], $active_pages);
                    $current_activity = ( strpos ($inner, 'li class="active"') === false ) ? '' : 'active';
                    $output .= '<li class="' . $current_activity . '"><a href="#" class="dropdown-toggle">' . ( isset($item['icon']) ? '<i class = "menu-icon fa fa-' . $item['icon'] . '" ></i >' : '' ) . '<span class="menu-text">' . $item['label'] . '</span><b class="arrow fa fa-angle-down"></b></a>    <b class="arrow"></b><ul class="submenu">' . $inner . '</ul></li>';
                }
            }
            return $output;
        }
 
        /**
         * @return bool
         * @throws \Exception
         */
        public function handleWidget() {
            global $auth;
 
            if ($this->getGETArg ('widget')[0]) {
                $apiKey = $this->getGETArg ('api_key')[1];
                $widget = $this->getGETArg ('widget')[1];
                $widget = $this->getWidget ($widget);
                if ($auth->checkAPIKey ($apiKey)) {
                    $_GET = array_merge ($_GET, $widget);
                    return true;
                }
            }
            return false;
        }
 
        /**
         * @param $widget
         * @return mixed
         * @throws \Exception
         * TODO: Transfer to localDb class
         */
        public function getWidget($widget) {
            if (json_decode (base64_decode ($widget), true, 512, JSON_THROW_ON_ERROR) === NULL) {
                throw new Exception('Invalid widget base64 passed');
            }
 
            return json_decode (base64_decode ($widget), true);
Arguments
  1. "eyJjb250cm9sbGVyIjoiYXBwcyIsImFjdGlvbiI6ImFzc2Vzc21lbnQifQ%3D%3D"
    
 
    include_once __DIR__ . DIRECTORY_SEPARATOR . 'init.php';
    if ($_SERVER['REQUEST_METHOD'] === 'POST') {
        if (isset($_POST['logout'])) {
            $auth->logout ();
            header ('Location: ' . $config::$server);
        }
    }
?>
<!DOCTYPE html>
<!--suppress ALL -->
<html lang = "<?= substr ($locale,0,2)?>" >
<?php include_once __DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'head.php'; ?>
<script type = "text/javascript" >
    $(document).ready(function () {
        $(".active").addClass("open");
    });
</script >
<body class = "<?= ( $func->getGETArg ('controller')[1] === 'login' ? 'login-layout blur-login' : 'skin-1' ) ?>" >
<?php if (!$func->handleWidget () && $func->getGETArg ('controller')[1] !== 'login'): ?>
<div id = "navbar" class = "navbar navbar-default ace-save-state" >
    <div class = "navbar-container ace-save-state" id = "navbar-container" >
        <button type = "button" class = "navbar-toggle menu-toggler pull-left" id = "menu-toggler"
                data-target = "#sidebar" >
            <span class = "sr-only" >Toggle sidebar</span >
 
            <span class = "icon-bar" ></span >
 
            <span class = "icon-bar" ></span >
 
            <span class = "icon-bar" ></span >
        </button >
 
        <div class = "navbar-header pull-left" >
            <a href = "<?= $config::$server ?>" class = "navbar-brand" >
                <img
                        src="assets/images/logo.svg"
                        alt="Soil data center logo"
                        style="margin-top: -4px;border-radius: 20%;border: 2px solid #FFF;height: 35px;
                        background: #e6e6e6;display: inline-block;

Environment & details:

Key Value
widget
"eyJjb250cm9sbGVyIjoiYXBwcyIsImFjdGlvbiI6ImFzc2Vzc21lbnQifQ%3D%3D"
noredirect
"true"
api_key
"0"
db
"local"
empty
empty
empty
empty
Key Value
PHP_EXTRA_CONFIGURE_ARGS
"--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi"
HOSTNAME
"b5fcbb8d78a2"
PHP_INI_DIR
"/usr/local/etc/php"
HOME
"/var/www"
PHP_LDFLAGS
"-Wl,-O1 -pie"
PHP_CFLAGS
"-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
PHP_VERSION
"7.4.23"
GPG_KEYS
"42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312"
PHP_CPPFLAGS
"-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
PHP_ASC_URL
"https://www.php.net/distributions/php-7.4.23.tar.xz.asc"
PHP_URL
"https://www.php.net/distributions/php-7.4.23.tar.xz"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
PHPIZE_DEPS
"autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c"
PWD
"/app"
PHP_SHA256
"cea52313fcffe56343bcd3c66dbb23cd5507dc559cc2e3547cf8f5452e88a05d"
USER
"www-data"
HTTP_HOST
"datacenter.don-plodorodie.ru"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
REDIRECT_STATUS
"200"
SERVER_NAME
""
SERVER_PORT
"80"
SERVER_ADDR
"172.18.0.4"
REMOTE_PORT
"59464"
REMOTE_ADDR
"3.227.239.9"
SERVER_SOFTWARE
"nginx/1.19.3"
GATEWAY_INTERFACE
"CGI/1.1"
REQUEST_SCHEME
"http"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/app"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/?widget=eyJjb250cm9sbGVyIjoiYXBwcyIsImFjdGlvbiI6ImFzc2Vzc21lbnQifQ%253D%253D&noredirect=true&api_key=0&db=local"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
"widget=eyJjb250cm9sbGVyIjoiYXBwcyIsImFjdGlvbiI6ImFzc2Vzc21lbnQifQ%253D%253D&noredirect=true&api_key=0&db=local"
SCRIPT_FILENAME
"/app/index.php"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711650025.5049
REQUEST_TIME
1711650025
argv
array:1 [
  0 => "widget=eyJjb250cm9sbGVyIjoiYXBwcyIsImFjdGlvbiI6ImFzc2Vzc21lbnQifQ%253D%253D&noredirect=true&api_key=0&db=local"
]
argc
1
Key Value
PHP_EXTRA_CONFIGURE_ARGS
"--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi"
HOSTNAME
"b5fcbb8d78a2"
PHP_INI_DIR
"/usr/local/etc/php"
HOME
"/var/www"
PHP_LDFLAGS
"-Wl,-O1 -pie"
PHP_CFLAGS
"-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
PHP_VERSION
"7.4.23"
GPG_KEYS
"42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312"
PHP_CPPFLAGS
"-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
PHP_ASC_URL
"https://www.php.net/distributions/php-7.4.23.tar.xz.asc"
PHP_URL
"https://www.php.net/distributions/php-7.4.23.tar.xz"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
PHPIZE_DEPS
"autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c"
PWD
"/app"
PHP_SHA256
"cea52313fcffe56343bcd3c66dbb23cd5507dc559cc2e3547cf8f5452e88a05d"
USER
"www-data"
HTTP_HOST
"datacenter.don-plodorodie.ru"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
REDIRECT_STATUS
"200"
SERVER_NAME
""
SERVER_PORT
"80"
SERVER_ADDR
"172.18.0.4"
REMOTE_PORT
"59464"
REMOTE_ADDR
"3.227.239.9"
SERVER_SOFTWARE
"nginx/1.19.3"
GATEWAY_INTERFACE
"CGI/1.1"
REQUEST_SCHEME
"http"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/app"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/?widget=eyJjb250cm9sbGVyIjoiYXBwcyIsImFjdGlvbiI6ImFzc2Vzc21lbnQifQ%253D%253D&noredirect=true&api_key=0&db=local"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
"widget=eyJjb250cm9sbGVyIjoiYXBwcyIsImFjdGlvbiI6ImFzc2Vzc21lbnQifQ%253D%253D&noredirect=true&api_key=0&db=local"
SCRIPT_FILENAME
"/app/index.php"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711650025.5049
REQUEST_TIME
1711650025
argv
array:1 [
  0 => "widget=eyJjb250cm9sbGVyIjoiYXBwcyIsImFjdGlvbiI6ImFzc2Vzc21lbnQifQ%253D%253D&noredirect=true&api_key=0&db=local"
]
argc
1
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler