Whoops \ Exception \ ErrorException (E_NOTICE)
Trying to access array offset on value of type bool Whoops\Exception\ErrorException thrown with message "Trying to access array offset on value of type bool" Stacktrace: #8 Whoops\Exception\ErrorException in /customers/9/e/a/kubot.it/httpd.www/views/pageTemplate.php:5 #7 Whoops\Run:handleError in /customers/9/e/a/kubot.it/httpd.www/views/pageTemplate.php:5 #6 include in /customers/9/e/a/kubot.it/httpd.www/php/FuxFramework/helpers.php:50 #5 view in /customers/9/e/a/kubot.it/httpd.www/controllers/CustomPageController.php:13 #4 CustomPageController:customPage in /customers/9/e/a/kubot.it/httpd.www/routes/frontend.php:37 #3 {closure} in /customers/9/e/a/kubot.it/httpd.www/php/FuxFramework/Routing/Router.php:111 #2 call_user_func_array in /customers/9/e/a/kubot.it/httpd.www/php/FuxFramework/Routing/Router.php:111 #1 Fux\Router:resolve in /customers/9/e/a/kubot.it/httpd.www/php/FuxFramework/Routing/Router.php:137 #0 Fux\Router:__destruct in [internal]:0
Stack frames (9)
8
Whoops\Exception\ErrorException
/views/pageTemplate.php5
7
Whoops\Run handleError
/views/pageTemplate.php5
6
include
/php/FuxFramework/helpers.php50
5
view
/controllers/CustomPageController.php13
4
CustomPageController customPage
/routes/frontend.php37
3
{closure}
/php/FuxFramework/Routing/Router.php111
2
call_user_func_array
/php/FuxFramework/Routing/Router.php111
1
Fux\Router resolve
/php/FuxFramework/Routing/Router.php137
0
Fux\Router __destruct
[internal]0
/customers/9/e/a/kubot.it/httpd.www/views/pageTemplate.php
<?php include_once(__DIR__."/../php/FuxFramework/bootstrap.php"); ?>
<!DOCTYPE html>
<html>
<head>
    <title><?= "$pagina[titolo] - ".PROJECT_NAME ?></title>
    <meta name="description" content="<?= $pagina["descrizione"] ?>">
    <meta name="keywords" content="<?= $pagina["keywords"] ?>">
    <meta property="og:locale" content="$lang">
    <meta property="og:type" content="website">
    <meta property="og:title" content="<?= "$pagina[titolo] - ".PROJECT_NAME ?>">
    <meta property="og:description" content="<?= $pagina["descrizione"] ?>">
    <meta property="og:url" content="<?= $request->url ?>">
    <meta property="og:site_name" content="<?= SITE_NAME ?>">
    <meta property="og:image" content="<?= $pagina["og_image"] ?>">
    <meta property="og:image:secure_url" content="<?= $pagina["og_image"] ?>">
    <meta property="author" content="Matteo Fusillo">
    <?php include(__DIR__."/../head.php"); ?>
    <?= Contenuti::generateHreflang($pagina['id_contenuto'], $lang) ?>
    <style>
        body{
            background:#f9f9f9;
        }
    </style>
</head>
<body>
<?php include(__DIR__."/menu.php"); ?>
<div class="menu-clear-height" style="height: 72px;"></div>
<script>menuAlwaysColored = true; $(window).trigger("scroll");</script>
<div class="container">
    <div class='card my-4'>
        <div class="card-body">
            <?= $pagina['testo'] ?>
        </div>
    </div>
</div>
<?php include(__DIR__."/footer.php"); ?>
</body>
</html>
 
/customers/9/e/a/kubot.it/httpd.www/views/pageTemplate.php
<?php include_once(__DIR__."/../php/FuxFramework/bootstrap.php"); ?>
<!DOCTYPE html>
<html>
<head>
    <title><?= "$pagina[titolo] - ".PROJECT_NAME ?></title>
    <meta name="description" content="<?= $pagina["descrizione"] ?>">
    <meta name="keywords" content="<?= $pagina["keywords"] ?>">
    <meta property="og:locale" content="$lang">
    <meta property="og:type" content="website">
    <meta property="og:title" content="<?= "$pagina[titolo] - ".PROJECT_NAME ?>">
    <meta property="og:description" content="<?= $pagina["descrizione"] ?>">
    <meta property="og:url" content="<?= $request->url ?>">
    <meta property="og:site_name" content="<?= SITE_NAME ?>">
    <meta property="og:image" content="<?= $pagina["og_image"] ?>">
    <meta property="og:image:secure_url" content="<?= $pagina["og_image"] ?>">
    <meta property="author" content="Matteo Fusillo">
    <?php include(__DIR__."/../head.php"); ?>
    <?= Contenuti::generateHreflang($pagina['id_contenuto'], $lang) ?>
    <style>
        body{
            background:#f9f9f9;
        }
    </style>
</head>
<body>
<?php include(__DIR__."/menu.php"); ?>
<div class="menu-clear-height" style="height: 72px;"></div>
<script>menuAlwaysColored = true; $(window).trigger("scroll");</script>
<div class="container">
    <div class='card my-4'>
        <div class="card-body">
            <?= $pagina['testo'] ?>
        </div>
    </div>
</div>
<?php include(__DIR__."/footer.php"); ?>
</body>
</html>
 
/customers/9/e/a/kubot.it/httpd.www/php/FuxFramework/helpers.php
 
// Does not support flag GLOB_BRACE
function rglob($pattern, $flags = 0) {
    $files = glob($pattern, $flags);
    foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) {
        $files = array_merge($files, rglob($dir.'/'.basename($pattern), $flags));
    }
    return $files;
}
 
function view($viewName, $viewData = []){
    global $mysqli, $lang, $lang_id;
    //$lang = LanguageService::getCurrentLanguageCode();
    if (!preg_match("/(.*)\.php/", $viewName)) $viewName.=".php";
 
    foreach($viewData as $varName => $value){
        ${$varName} = $value;
    }
 
    include(__DIR__."/../../views/$viewName");
 
    return "";
}
 
function asset($asset){
    if (substr($asset,0,1) === "/"){
        $asset = substr($asset, 1);
    }
    return "https://".DOMAIN_NAME.PROJECT_DIR."/public/".$asset;
}
 
function redirect($route){
    header("Location: https://".DOMAIN_NAME.PROJECT_DIR.$route);exit;
}
 
function routeFullUrl($route){
    return "https://".DOMAIN_NAME.PROJECT_DIR.$route;
}
 
if (!function_exists('sanitize_post')) {
/customers/9/e/a/kubot.it/httpd.www/controllers/CustomPageController.php
<?php
 
include_once(__DIR__."/../php/FuxFramework/helpers.php");
include_once(__DIR__."/../php/FuxFramework/helpers.php");
include_once(__DIR__."/../models/mysqli.php");
include_once(__DIR__."/../models/contenuti.class.php");
 
class CustomPageController
{
    public static function customPage($request){
        $params = $request->getParams();
        $pagina = Contenuti::getFromUrl($params['url'],$params['lang'], false);
        return view('pageTemplate', ['request' => $request,'pagina' => $pagina, 'lang' => $params['lang']]);
    }
}
/customers/9/e/a/kubot.it/httpd.www/routes/frontend.php
});
 
$router->get('/category/{id_categoria}/{nome_categoria}', function($request){
    return CategoryPageController::categoryPage($request);
});
 
$router->get('/product/{id_prodotto}/{nome_prodotto}', function($request){
    return ProductPageController::productPage($request);
});
 
//Routes per pagine/blogpost del sito
$router->get('/en/{url}', function($request){
    $request->setParams(array_merge($request->getParams(), ["lang"=>"en"]));
    return CustomPageController::customPage($request);
});
 
//Routes per pagine/blogpost del sito
$router->get('/it/{url}', function($request){
    $request->setParams(array_merge($request->getParams(), ["lang"=>"it"]));
    return CustomPageController::customPage($request);
});
/customers/9/e/a/kubot.it/httpd.www/php/FuxFramework/Routing/Router.php
            $this->defaultRequestHandler();
            return;
        }
 
        $middlewares = $validRoute->middleware;
        $numMiddlewares = count($middlewares);
        if ($numMiddlewares) {
            for ($i = 0; $i < $numMiddlewares; $i++) {
                //Si fa una chain di middleware fino al penultimo. L'ultimo punta alla closure della route
                $validRoute->middleware[$i]->setRequest($this->request);
                if ($i < $numMiddlewares-1){
                    $validRoute->middleware[$i]->setNext($validRoute->middleware[$i + 1]);
                }else{
                    $validRoute->middleware[$i]->setNext($validRoute->closure);
                }
 
            }
            echo $validRoute->middleware[0]->handle();
        }else{
            echo call_user_func_array($validRoute->closure, array($this->request));
        }
 
    }
 
    function getRouteRegEx($route){
        $params = $this->getRouteParamsName($route);
        foreach($params as $p){
            $route = str_replace("{{$p}}","(.*)",$route);
        }
        return str_replace("/","\\/",$route)."$";
    }
 
    function getRouteParamsName($route){
        $el = explode("/",$route);
        $params = [];
        foreach($el as $p){
            if (preg_match("/{(.*)}/",$p)){
                $params[] = preg_replace("/({{1}|}{1})/","",$p);
            }
        }
/customers/9/e/a/kubot.it/httpd.www/php/FuxFramework/Routing/Router.php
            $this->defaultRequestHandler();
            return;
        }
 
        $middlewares = $validRoute->middleware;
        $numMiddlewares = count($middlewares);
        if ($numMiddlewares) {
            for ($i = 0; $i < $numMiddlewares; $i++) {
                //Si fa una chain di middleware fino al penultimo. L'ultimo punta alla closure della route
                $validRoute->middleware[$i]->setRequest($this->request);
                if ($i < $numMiddlewares-1){
                    $validRoute->middleware[$i]->setNext($validRoute->middleware[$i + 1]);
                }else{
                    $validRoute->middleware[$i]->setNext($validRoute->closure);
                }
 
            }
            echo $validRoute->middleware[0]->handle();
        }else{
            echo call_user_func_array($validRoute->closure, array($this->request));
        }
 
    }
 
    function getRouteRegEx($route){
        $params = $this->getRouteParamsName($route);
        foreach($params as $p){
            $route = str_replace("{{$p}}","(.*)",$route);
        }
        return str_replace("/","\\/",$route)."$";
    }
 
    function getRouteParamsName($route){
        $el = explode("/",$route);
        $params = [];
        foreach($el as $p){
            if (preg_match("/{(.*)}/",$p)){
                $params[] = preg_replace("/({{1}|}{1})/","",$p);
            }
        }
/customers/9/e/a/kubot.it/httpd.www/php/FuxFramework/Routing/Router.php
        foreach($params as $p){
            $route = str_replace("{{$p}}","(.*)",$route);
        }
        return str_replace("/","\\/",$route)."$";
    }
 
    function getRouteParamsName($route){
        $el = explode("/",$route);
        $params = [];
        foreach($el as $p){
            if (preg_match("/{(.*)}/",$p)){
                $params[] = preg_replace("/({{1}|}{1})/","",$p);
            }
        }
        return $params;
    }
 
    function __destruct()
    {
        $this->resolve();
    }
}
 
 
 
/**
 * La classe route deve fornire una interfaccia per il router e deve contenere al suo interno:
 * - route come string
 * - il metodo da eseguire quando viene richiamata
 * - una lista di middleware da utilizzare come filtri della richiesta HTTP
 */
class Route{
    public $route = "/";
    public $closure = null;
    public $method = "get";
    public $middleware = [];
 
    public function __construct($httpMethod, $route, $closure){
        $this->route = $route;
        $this->method = $httpMethod;
[internal]

Environment & details:

empty
empty
empty
empty
Key Value
lang Array ( [id_lingua] => 1 [codice] => it [nome] => Italiano )
Key Value
ONECOM_DOMAIN_NAME kubot.it
ONECOM_DOMAIN_ROOT /customers/9/e/a/kubot.it/
ONECOM_MEMORYLIMIT 2684354560
ONECOM_CPU_SHARES 4096
ONECOM_EXEC latest
ONECOM_DIR_LAYOUT_VER 0
ORIG_PATH_TRANSLATED /customers/9/e/a/kubot.it/httpd.www/indexRoute.php
ORIG_PATH_INFO /it/shop/22/PLA-Antracite-Standard/
CONTENT_LENGTH 0
HTTP_CONNECTION close
SCRIPT_NAME /indexRoute.php
REQUEST_URI /it/shop/22/PLA-Antracite-Standard/
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /it/shop/22/PLA-Antracite-Standard/
REMOTE_PORT 54490
SCRIPT_FILENAME /customers/9/e/a/kubot.it/httpd.www/indexRoute.php
SERVER_ADMIN support@one.com
CONTEXT_DOCUMENT_ROOT /var/www
CONTEXT_PREFIX
REQUEST_SCHEME https
REMOTE_ADDR 3.94.21.209
SERVER_PORT 80
SERVER_ADDR 10.27.33.18
SERVER_NAME kubot.it
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HTTP_X_VARNISH 587114188
HTTP_ACCEPT_ENCODING gzip
HTTP_HOST kubot.it
HTTP_X_ONECOM_HOST kubot.it
HTTP_X_FORWARDED_PROTO https
HTTP_X_ONECOM_FORWARDED_PROTO https
HTTP_X_FORWARDED_FOR 3.94.21.209
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
ENV_VCV_ENV_ADDONS_ID one.com
ENV_VCV_TOKEN_URL https://wpapi.one.com/api/v1.0/plugins/visualcomposer/activate
ONECOM_WP_ADDONS_API https://wpapi.one.com
ONECOM_WEBSHOP_HOST webshop1.cst.webpod7-cph3.one.com
HTTPS on
ONECOM_TMPDIR /customers/9/e/a/kubot.it//tmp
DOMAIN_NAME kubot.it
ONECOM_DOCUMENT_ROOT /customers/9/e/a/kubot.it/httpd.www
DOCUMENT_ROOT /customers/9/e/a/kubot.it/httpd.www
REDIRECT_STATUS 200
REDIRECT_ENV_VCV_ENV_ADDONS_ID one.com
REDIRECT_ENV_VCV_TOKEN_URL https://wpapi.one.com/api/v1.0/plugins/visualcomposer/activate
REDIRECT_ONECOM_WP_ADDONS_API https://wpapi.one.com
REDIRECT_ONECOM_WEBSHOP_HOST webshop1.cst.webpod7-cph3.one.com
REDIRECT_HTTPS on
REDIRECT_ONECOM_CPU_SHARES 4096
REDIRECT_ONECOM_MEMORYLIMIT 2684354560
REDIRECT_ONECOM_EXEC latest
REDIRECT_ONECOM_DIR_LAYOUT_VER 0
REDIRECT_ONECOM_TMPDIR /customers/9/e/a/kubot.it//tmp
REDIRECT_ONECOM_DOMAIN_ROOT /customers/9/e/a/kubot.it/
REDIRECT_ONECOM_DOMAIN_NAME kubot.it
REDIRECT_DOMAIN_NAME kubot.it
REDIRECT_ONECOM_DOCUMENT_ROOT /customers/9/e/a/kubot.it/httpd.www
REDIRECT_DOCUMENT_ROOT /customers/9/e/a/kubot.it/httpd.www
FCGI_ROLE RESPONDER
PHP_SELF /indexRoute.php/it/shop/22/PLA-Antracite-Standard/
REQUEST_TIME_FLOAT 1606992736.7378
REQUEST_TIME 1606992736
Key Value
ONECOM_DOMAIN_NAME kubot.it
ONECOM_DOMAIN_ROOT /customers/9/e/a/kubot.it/
ONECOM_MEMORYLIMIT 2684354560
ONECOM_CPU_SHARES 4096
ONECOM_EXEC latest
ONECOM_DIR_LAYOUT_VER 0
ORIG_PATH_TRANSLATED /customers/9/e/a/kubot.it/httpd.www/indexRoute.php
ORIG_PATH_INFO /it/shop/22/PLA-Antracite-Standard/
CONTENT_LENGTH 0
HTTP_CONNECTION close
SCRIPT_NAME /indexRoute.php
REQUEST_URI /it/shop/22/PLA-Antracite-Standard/
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /it/shop/22/PLA-Antracite-Standard/
REMOTE_PORT 54490
SCRIPT_FILENAME /customers/9/e/a/kubot.it/httpd.www/indexRoute.php
SERVER_ADMIN support@one.com
CONTEXT_DOCUMENT_ROOT /var/www
CONTEXT_PREFIX
REQUEST_SCHEME https
REMOTE_ADDR 3.94.21.209
SERVER_PORT 80
SERVER_ADDR 10.27.33.18
SERVER_NAME kubot.it
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HTTP_X_VARNISH 587114188
HTTP_ACCEPT_ENCODING gzip
HTTP_HOST kubot.it
HTTP_X_ONECOM_HOST kubot.it
HTTP_X_FORWARDED_PROTO https
HTTP_X_ONECOM_FORWARDED_PROTO https
HTTP_X_FORWARDED_FOR 3.94.21.209
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
ENV_VCV_ENV_ADDONS_ID one.com
ENV_VCV_TOKEN_URL https://wpapi.one.com/api/v1.0/plugins/visualcomposer/activate
ONECOM_WP_ADDONS_API https://wpapi.one.com
ONECOM_WEBSHOP_HOST webshop1.cst.webpod7-cph3.one.com
HTTPS on
ONECOM_TMPDIR /customers/9/e/a/kubot.it//tmp
DOMAIN_NAME kubot.it
ONECOM_DOCUMENT_ROOT /customers/9/e/a/kubot.it/httpd.www
DOCUMENT_ROOT /customers/9/e/a/kubot.it/httpd.www
REDIRECT_STATUS 200
REDIRECT_ENV_VCV_ENV_ADDONS_ID one.com
REDIRECT_ENV_VCV_TOKEN_URL https://wpapi.one.com/api/v1.0/plugins/visualcomposer/activate
REDIRECT_ONECOM_WP_ADDONS_API https://wpapi.one.com
REDIRECT_ONECOM_WEBSHOP_HOST webshop1.cst.webpod7-cph3.one.com
REDIRECT_HTTPS on
REDIRECT_ONECOM_CPU_SHARES 4096
REDIRECT_ONECOM_MEMORYLIMIT 2684354560
REDIRECT_ONECOM_EXEC latest
REDIRECT_ONECOM_DIR_LAYOUT_VER 0
REDIRECT_ONECOM_TMPDIR /customers/9/e/a/kubot.it//tmp
REDIRECT_ONECOM_DOMAIN_ROOT /customers/9/e/a/kubot.it/
REDIRECT_ONECOM_DOMAIN_NAME kubot.it
REDIRECT_DOMAIN_NAME kubot.it
REDIRECT_ONECOM_DOCUMENT_ROOT /customers/9/e/a/kubot.it/httpd.www
REDIRECT_DOCUMENT_ROOT /customers/9/e/a/kubot.it/httpd.www
FCGI_ROLE RESPONDER
0. Whoops\Handler\PrettyPageHandler