Phalcon Framework 4.1.2

Error: Call to a member function getUri() on null

/var/www/html/korting-en-acties.nl/cache/volt/Tmpl_Site_PhalCMS_Post_Show.volt.php (40)
#0unknown
#1Phalcon\Mvc\View\Engine\Volt->render(/var/www/html/korting-en-acties.nl/src/app/Tmpl/Site/PhalCMS/Post/Show.volt, Array([siteName] => Korting en Acties, [cmsConfig] => Object(CLSystems\Php\Registry), [user] => Object(CLSystems\PhalCMS\Lib\Helper\User), [metadata] => Object(stdClass), [breadcrumbs] => Array([0] => Array([link] => /, [title] => Home), [1] => Array([link] => /merken, [title] => Merken), [2] => Array([link] => (empty string), [title] => Solarlampkoning.nl)), [post] => Object(CLSystems\PhalCMS\Lib\Mvc\Model\Post)), true)
#2Phalcon\Mvc\View->engineRender(Array([.volt] => Object(Phalcon\Mvc\View\Engine\Volt)), Post/Show, true)
#3Phalcon\Mvc\View->processRender(display, show, Array())
#4Phalcon\Mvc\View->render(display, show)
#5Phalcon\Mvc\Application->handle(/merken/solarlampkoning)
/var/www/html/korting-en-acties.nl/src/app/Lib/CmsApplication.php (117)
<?php
 
namespace CLSystems\PhalCMS\Lib;
 
use Phalcon\Loader;
use Phalcon\Http\Response;
use Phalcon\Events\Event;
use Phalcon\Mvc\Application;
use Phalcon\Mvc\Dispatcher;
use Phalcon\Mvc\View;
use CLSystems\PhalCMS\Lib\Helper\Asset;
use CLSystems\PhalCMS\Lib\Helper\Config;
use CLSystems\PhalCMS\Lib\Helper\Uri;
use CLSystems\PhalCMS\Lib\Helper\State;
use CLSystems\PhalCMS\Lib\Helper\User;
use CLSystems\PhalCMS\Lib\Helper\Event as EventHelper;
use CLSystems\PhalCMS\Lib\Mvc\View\ViewBase;
use CLSystems\Php\Registry;
use MatthiasMullie\Minify;
use Exception;
 
class CmsApplication extends Application
{
    public function execute()
    {
        try {
            $eventsManager = $this->di->getShared('eventsManager');
            $eventsManager->attach('application:beforeSendResponse', $this);
            $plugins = EventHelper::getPlugins();
            $systemEvents = [
                'application:beforeSendResponse',
                'dispatch:beforeExecuteRoute',
                'dispatch:beforeException',
                'dispatch:beforeDispatch',
                'dispatch:afterDispatch',
                'dispatch:afterInitialize',
            ];
 
            foreach ($plugins['System'] as $className => $config) {
                $handler = EventHelper::getHandler($className, $config);
 
                foreach ($systemEvents as $systemEvent) {
                    $eventsManager->attach($systemEvent, $handler);
                }
            }
 
            // Update view dirs
            define('TPL_SITE_PATH', APP_PATH . '/Tmpl/Site/' . Config::get('siteTemplate', 'PhalCMS'));
            define('TPL_ADMINISTRATOR_PATH', APP_PATH . '/Tmpl/Administrator');
            define('TPL_SYSTEM_PATH', APP_PATH . '/Tmpl/System');
 
            if (Uri::isClient('site')) {
                $viewDirs = [
                    TPL_SITE_PATH . '/Tmpl/',
                    TPL_SITE_PATH . '/',
                ];
            } else {
                $viewDirs = [
                    TPL_ADMINISTRATOR_PATH . '/',
                ];
            }
 
            foreach (['System', 'Cms'] as $plgGroup) {
                if (isset($plugins[$plgGroup])) {
                    /**
                     * @var string $pluginClass
                     * @var Registry $pluginConfig
                     */
 
 
                    foreach ($plugins[$plgGroup] as $pluginClass => $pluginConfig) {
                        $pluginName = $pluginConfig->get('manifest.name');
                        $pluginPath = PLUGIN_PATH . '/' . $plgGroup . '/' . $pluginName;
                        $psrPaths = [];
 
                        if (is_dir($pluginPath . '/Tmpl')) {
                            $viewDirs[] = $pluginPath . '/Tmpl/';
                        }
 
                        if (is_dir($pluginPath . '/Lib')) {
                            $psrPaths['CLSystems\\PhalCMS\\Lib'] = $pluginPath . '/Lib';
                        }
 
                        if (is_dir($pluginPath . '/Widget')) {
                            $psrPaths['CLSystems\\PhalCMS\\Widget'] = $pluginPath . '/Widget';
                        }
 
                        if ($psrPaths) {
                            (new Loader)
                                ->registerNamespaces($psrPaths, true)
                                ->register();
                        }
                    }
                }
            }
 
            $viewDirs[] = TPL_SYSTEM_PATH . '/';
 
            /** @var ViewBase $view */
            $view = $this->di->getShared('view');
            $requestUri = $_SERVER['REQUEST_URI'];
 
            if (Config::get('siteOffline') === 'Y'
                && !User::getInstance()->access('super')
            ) {
                $this->view->setMainView('Offline/Index');
 
                if (strpos($requestUri, '/user/') !== 0) {
                    $requestUri = '';
                }
            } else {
                $view->setMainView('Index');
            }
 
            $view->setViewsDir($viewDirs);
            $this->setEventsManager($eventsManager);
            $this->handle($requestUri)->send();
        } catch (Exception $e) {
            if (true === DEVELOPMENT_MODE) {
                // Let Phalcon Debug catch this
                throw $e;
            }
 
            try {
                if (User::getInstance()->access('super')) {
                    State::setMark('exception', $e);
                }
 
                /**
                 * @var Dispatcher $dispatcher
                 * @var View $view
                 */
                $dispatcher = $this->getDI()->getShared('dispatcher');
                $dispatcher->setControllerName(Uri::isClient('administrator') ? 'admin_error' : 'error');
                $dispatcher->setActionName('show');
                $dispatcher->setParams(
                    [
                        'code'    => $e->getCode(),
                        'message' => $e->getMessage(),
                    ]
                );
 
                $view = $this->getDI()->getShared('view');
                $view->start();
                $dispatcher->dispatch();
                $view->render(
                    $dispatcher->getControllerName(),
                    $dispatcher->getActionName(),
                    $dispatcher->getParams()
                );
                $view->finish();
                echo $view->getContent();
            } catch (Exception $e2) {
                debugVar($e2->getMessage());
            }
        }
    }
 
    protected function getCompressor($type)
    {
        if ('css' === $type) {
            $compressor = new Minify\CSS;
            $compressor->setImportExtensions(
                [
                    'gif' => 'data:image/gif',
                    'png' => 'data:image/png',
                    'svg' => 'data:image/svg+xml',
                ]
            );
        } else {
            $compressor = new Minify\JS;
        }
 
        return $compressor;
    }
 
    protected function compressAssets()
    {
        $basePath = PUBLIC_PATH . '/assets';
        $assets = Factory::getService('assets');
 
        foreach (Asset::getFiles() as $type => $files) {
            $fileName = md5(implode(':', $files)) . '.' . $type;
            $filePath = $basePath . '/compressed/' . $fileName;
            $fileUri = DOMAIN . '/assets/compressed/' . $fileName . (DEVELOPMENT_MODE ? '?' . time() : '');
            $hasAsset = is_file($filePath);
            $ucType = ucfirst($type);
            $addFunc = 'add' . $ucType;
 
            if ($hasAsset && !DEVELOPMENT_MODE) {
                call_user_func_array([$assets, $addFunc], [$fileUri, false]);
                continue;
            }
 
            $compressor = self::getCompressor($type);
 
            foreach ($files as $file) {
                $compressor->add($file);
            }
 
            if (!is_dir($basePath . '/compressed/')) {
                mkdir($basePath . '/compressed/', 0777, true);
            }
 
            if ($compressor->minify($filePath)) {
                chmod($filePath, 0777);
                call_user_func_array([$assets, $addFunc], [$fileUri, false]);
            }
 
            unset($compressor);
        }
    }
 
    public function beforeSendResponse(Event $event, CmsApplication $app, Response $response)
    {
        $request = $this->di->getShared('request');
 
        if ($request->isAjax()) {
            return;
        }
 
        /** @var Asset $assets */
        $this->compressAssets();
        $assets = $this->di->getShared('assets');
 
        // Compress CSS
        ob_start();
        $assets->outputCss();
        $assets->outputInlineCss();
        $content = str_replace('</head>', ob_get_clean() . '</head>', $response->getContent());
 
        // Compress JS
        ob_start();
        $assets->outputJs();
        $assets->outputInlineJs();
        $code = Asset::getCode() . ob_get_clean();
 
        // Extra code (in the footer)
        $content = str_replace('</body>', $code . '</body>', $content);
        $response->setContent($content);
    }
}
#6CLSystems\PhalCMS\Lib\CmsApplication->execute()
/var/www/html/korting-en-acties.nl/public/index.php (16)
<?php
declare(strict_types=1);
 
error_reporting(E_ALL);
ini_set('display_errors', 'true');
ini_set('date.timezone', 'Europe/Amsterdam');
setlocale(LC_ALL, 'nl_NL.UTF-8', 'nl_NL@euro', 'nl_NL', 'dutch');
 
use CLSystems\PhalCMS\Lib\Factory;
 
define('BASE_PATH', dirname(__DIR__));
 
require_once BASE_PATH . '/src/app/Lib/Factory.php';
 
// Execute application
Factory::getApplication()->execute();
KeyValue
_url/merken/solarlampkoning
KeyValue
PHP_FCGI_MAX_REQUESTS5000
PHPRC/etc/php/7.3/cgi/
PWD/var/www/php-fcgi-scripts/web1
TMPDIR/var/www/clients/client1/web1/tmp
TEMP/var/www/clients/client1/web1/tmp
SHLVL0
TMP/var/www/clients/client1/web1/tmp
PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHP_DOCUMENT_ROOT/var/www/clients/client1/web1
CONTENT_LENGTH0
SCRIPT_NAME/index.php
REQUEST_URI/merken/solarlampkoning
QUERY_STRING_url=/merken/solarlampkoning
REQUEST_METHODGET
SERVER_PROTOCOLHTTP/1.1
GATEWAY_INTERFACECGI/1.1
REDIRECT_QUERY_STRING_url=/merken/solarlampkoning
REDIRECT_URL/merken/solarlampkoning
REMOTE_PORT44972
SCRIPT_FILENAME/var/www/korting-en-acties.nl/web/index.php
SERVER_ADMINwebmaster@korting-en-acties.nl
CONTEXT_DOCUMENT_ROOT/var/www/korting-en-acties.nl/web
CONTEXT_PREFIX
REQUEST_SCHEMEhttps
DOCUMENT_ROOT/var/www/korting-en-acties.nl/web
REMOTE_ADDR34.236.192.4
SERVER_PORT443
SERVER_ADDR5.182.33.171
SERVER_NAMEkorting-en-acties.nl
SERVER_SOFTWAREApache
SERVER_SIGNATURE
HTTP_CONNECTIONclose
HTTP_HOSTkorting-en-acties.nl
HTTP_ACCEPT_ENCODINGbr,gzip
HTTP_ACCEPT_LANGUAGEen-US,en;q=0.5
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
SSL_TLS_SNIkorting-en-acties.nl
HTTPSon
REDIRECT_STATUS200
REDIRECT_SSL_TLS_SNIkorting-en-acties.nl
REDIRECT_HTTPSon
FCGI_ROLERESPONDER
PHP_SELF/index.php
REQUEST_TIME_FLOAT1660680741,7906
REQUEST_TIME1660680741
#Path
0/var/www/html/korting-en-acties.nl/public/index.php
1/var/www/html/korting-en-acties.nl/src/app/Lib/Factory.php
2/var/www/html/korting-en-acties.nl/src/app/Config/Define.php
3/var/www/html/korting-en-acties.nl/src/app/Config/Loader.php
4/var/www/html/korting-en-acties.nl/vendor/autoload.php
5/var/www/html/korting-en-acties.nl/vendor/composer/autoload_real.php
6/var/www/html/korting-en-acties.nl/vendor/composer/platform_check.php
7/var/www/html/korting-en-acties.nl/vendor/composer/ClassLoader.php
8/var/www/html/korting-en-acties.nl/vendor/composer/autoload_static.php
9/var/www/html/korting-en-acties.nl/vendor/symfony/deprecation-contracts/function.php
10/var/www/html/korting-en-acties.nl/vendor/symfony/polyfill-php80/bootstrap.php
11/var/www/html/korting-en-acties.nl/vendor/symfony/polyfill-intl-normalizer/bootstrap.php
12/var/www/html/korting-en-acties.nl/vendor/ralouphie/getallheaders/src/getallheaders.php
13/var/www/html/korting-en-acties.nl/vendor/guzzlehttp/psr7/src/functions_include.php
14/var/www/html/korting-en-acties.nl/vendor/guzzlehttp/psr7/src/functions.php
15/var/www/html/korting-en-acties.nl/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
16/var/www/html/korting-en-acties.nl/vendor/symfony/polyfill-mbstring/bootstrap.php
17/var/www/html/korting-en-acties.nl/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php
18/var/www/html/korting-en-acties.nl/vendor/symfony/polyfill-ctype/bootstrap.php
19/var/www/html/korting-en-acties.nl/vendor/symfony/polyfill-php72/bootstrap.php
20/var/www/html/korting-en-acties.nl/vendor/symfony/polyfill-intl-grapheme/bootstrap.php
21/var/www/html/korting-en-acties.nl/vendor/guzzlehttp/promises/src/functions_include.php
22/var/www/html/korting-en-acties.nl/vendor/guzzlehttp/promises/src/functions.php
23/var/www/html/korting-en-acties.nl/vendor/symfony/polyfill-intl-idn/bootstrap.php
24/var/www/html/korting-en-acties.nl/vendor/guzzlehttp/guzzle/src/functions_include.php
25/var/www/html/korting-en-acties.nl/vendor/guzzlehttp/guzzle/src/functions.php
26/var/www/html/korting-en-acties.nl/vendor/symfony/polyfill-php73/bootstrap.php
27/var/www/html/korting-en-acties.nl/vendor/symfony/string/Resources/functions.php
28/var/www/html/korting-en-acties.nl/vendor/google/apiclient-services/autoload.php
29/var/www/html/korting-en-acties.nl/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php
30/var/www/html/korting-en-acties.nl/vendor/symfony/polyfill-iconv/bootstrap.php
31/var/www/html/korting-en-acties.nl/vendor/codeception/codeception/functions.php
32/var/www/html/korting-en-acties.nl/vendor/facebook/graph-sdk/src/Facebook/polyfills.php
33/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/aliases.php
34/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Client.php
35/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Service.php
36/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/AccessToken/Revoke.php
37/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/AccessToken/Verify.php
38/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Model.php
39/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Utils/UriTemplate.php
40/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/AuthHandler/Guzzle6AuthHandler.php
41/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php
42/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/AuthHandler/Guzzle5AuthHandler.php
43/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/AuthHandler/AuthHandlerFactory.php
44/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Http/Batch.php
45/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Http/MediaFileUpload.php
46/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Http/REST.php
47/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Task/Retryable.php
48/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Task/Exception.php
49/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Exception.php
50/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Task/Runner.php
51/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Collection.php
52/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Service/Exception.php
53/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Service/Resource.php
54/var/www/html/korting-en-acties.nl/vendor/google/apiclient/src/Task/Composer.php
55/var/www/html/korting-en-acties.nl/vendor/phalcon/dd/src/helper.php
56/var/www/html/korting-en-acties.nl/vendor/voku/portable-utf8/bootstrap.php
57/var/www/html/korting-en-acties.nl/vendor/voku/portable-utf8/src/voku/helper/Bootup.php
58/var/www/html/korting-en-acties.nl/vendor/voku/portable-utf8/src/voku/helper/UTF8.php
59/var/www/html/korting-en-acties.nl/vendor/clsystems/php-registry/src/Registry.php
60/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/Config.php
61/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/Asset.php
62/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/View/ViewBase.php
63/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/Volt.php
64/var/www/html/korting-en-acties.nl/src/app/Lib/CmsApplication.php
65/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/Language.php
66/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/FileSystem.php
67/var/www/html/korting-en-acties.nl/src/app/Language/de-DE/Locale.php
68/var/www/html/korting-en-acties.nl/src/app/Language/en-GB/Locale.php
69/var/www/html/korting-en-acties.nl/src/app/Language/nl-NL/Locale.php
70/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/Uri.php
71/var/www/html/korting-en-acties.nl/src/app/Language/nl-NL/nl-NL.php
72/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/Event.php
73/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Model/Config.php
74/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Model/ModelBase.php
75/var/www/html/korting-en-acties.nl/src/app/Plugin/Cms/OutLink/OutLink.php
76/var/www/html/korting-en-acties.nl/src/app/Lib/Plugin.php
77/var/www/html/korting-en-acties.nl/src/app/Plugin/Cms/SiteMap/SiteMap.php
78/var/www/html/korting-en-acties.nl/src/app/Plugin/Cms/SiteMap/Language/nl-NL.php
79/var/www/html/korting-en-acties.nl/src/app/Plugin/Cms/SocialLogin/SocialLogin.php
80/var/www/html/korting-en-acties.nl/src/app/Plugin/System/Backup/Backup.php
81/var/www/html/korting-en-acties.nl/src/app/Plugin/System/Backup/Language/nl-NL.php
82/var/www/html/korting-en-acties.nl/src/app/Plugin/System/Cms/Cms.php
83/var/www/html/korting-en-acties.nl/src/app/Config/Router.php
84/var/www/html/korting-en-acties.nl/src/app/Config/Router/Site.php
85/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Controller/DisplayController.php
86/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Controller/ControllerBase.php
87/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/User.php
88/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/State.php
89/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Model/User.php
90/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Model/UcmItem.php
91/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/UcmItem.php
92/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Model/Post.php
93/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/Text.php
94/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Model/PostCategory.php
95/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Model/Nested.php
96/var/www/html/korting-en-acties.nl/cache/volt/Tmpl_Site_PhalCMS_Post_Show.volt.php
97/var/www/html/korting-en-acties.nl/cache/volt/Tmpl_System_Breadcrumb_Breadcrumb.volt.php
98/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/IconSvg.php
99/var/www/html/korting-en-acties.nl/cache/volt/Tmpl_System_UcmItem_VouchersSlider.volt.php
100/var/www/html/korting-en-acties.nl/src/app/Lib/Helper/Image.php
101/var/www/html/korting-en-acties.nl/src/app/Lib/Mvc/Model/Rating.php
Memory
Usage2097152