Phalcon Framework 5.6.1

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

/home/bh61542/amberedge.ru/app/frontend/controllers/FeedbackController.php (54)
#0AmberEdge\Frontend\Controllers\FeedbackController->indexAction
#1Phalcon\Dispatcher\AbstractDispatcher->callActionMethod
#2Phalcon\Dispatcher\AbstractDispatcher->dispatch
#3Phalcon\Mvc\Application->handle
/home/bh61542/amberedge.ru/app/Common.php (216)
<?php
 
declare(strict_types=1);
 
namespace AmberEdge;
 
use Phalcon\Config\Config;
use Phalcon\Mvc\Application as MvcApp;
use Phalcon\DI\FactoryDefault;
use Phalcon\Http\Request;
use Phalcon\Session\Manager;
use Phalcon\Flash\Session as FlashSession;
use Phalcon\Mvc\Router;
use Phalcon\Session\Adapter\Stream;
 
/**
 * General class of modules
 *
 * Class Application
 * @package AmberEdge
 * @see https://docs.phalcon.io/5.0/en/mvc
 */
class Application extends MvcApp
{
    protected function registerServices()
    {
        /**
         * Creation of DI
         * @see https://docs.phalcon.io/5.0/en/api/phalcon_di
         */
        $di = new FactoryDefault();
 
        /**
         * Registering the Configuration Service
         * @see https://docs.phalcon.io/5.0/en/config
         */
        $di->set('cfg', function()
        {
            return require_once APP_PATH . 'Config.php';
        });
 
        /**
         * Registering the Query Service
         * @see https://docs.phalcon.io/5.0/en/request
         */
        $di->set('request', function()
        {
            return new Request();
        });
 
        /**
         * Registration of information messages service
         * @see https://docs.phalcon.io/5.0/en/flash
         */
        $di->set('flash', function()
        {
            return new FlashSession();
        });
 
        /**
         * Registering the Session Service
         * @see https://docs.phalcon.io/5.0/en/session
         */
        /*
        $di->set('session', function() use ($di)
        {
            $session = new Manager();
            $files = new Stream(array
            (
                'savePath' => $di['cfg']->app->tmp_path
            ));
            $session->setAdapter($files)->start();
 
            return $session;
        });
        */
 
        /**
         * Registering the Route Service
         * @see https://docs.phalcon.io/5.0/en/routing
         */
        $di->set('router', function() use ($di)
        {
            // Creating a router without support for standard routing
            $router = new Router();
 
            // Setting default options
            $router->setDefaultModule('frontend');
            $router->setDefaultController('index');
            $router->setDefaultAction('index');
 
            // Getting the routes
            $routes = $di['cfg']->routes;
            if ($di['cfg']->app->frontend->maintenance_mode)
            {
                $routes = new Config
                (
                    array
                    (
                        '/' => array
                        (
                            'params' => array
                            (
                                'module'     => 'frontend',
                                'controller' => 'index',
                                'action'     => 'redirectIndex',
                            ),
                        ),
 
                        '/{language:(%languages%)}/' => array
                        (
                            'params' => array
                            (
                                'module'     => 'frontend',
                                'controller' => 'errors',
                                'action'     => 'e503',
                                'language'   => 1
                            ),
                        ),
 
                        '/{language:(%languages%)}' => array
                        (
                            'params' => array
                            (
                                'module'     => 'frontend',
                                'controller' => 'index',
                                'action'     => 'redirectIndex',
                                'language'   => 1
                            ),
                        )
                    )
                );
            }
 
            // Defining routing rules
            if (count($routes))
            {
                $languages = $di['cfg']->app->frontend->languages->toArray();
                foreach ($routes as $route => $items)
                {
                    $lang = str_replace('%languages%', join('|', $languages), $route);
                    $router->add($lang, $items->params->toArray());
                }
            }
 
            $params = array
            (
                'controller' => 'errors',
                'action'     => 'e404',
            );
 
            if ($di['cfg']->app->frontend->maintenance_mode)
            {
                $params['action'] = 'e503';
            }
 
            // Specifying options for paths not found
            $router->notFound($params);
 
            return $router;
        });
 
        // URI Presentation Mode Check
        $base_ui = $di['cfg']->app->base_uri;
        $protocol = $di['cfg']->app->protocol;
 
        $uri = rtrim($base_ui, '/') . $di['request']->getURI();
        if ($di['cfg']->app->www_uri_mode)
        {
            if (strpos($base_ui, 'www.') === false)
            {
                $this->response->redirect(str_replace($protocol . '://', $protocol . '://www.', $uri), false, 301);
            }
        }
        else
        {
            if (strpos($base_ui, 'www.') !== false)
            {
                $this->response->redirect(str_replace('www.', '', $uri), false, 301);
            }
        }
        $this->setDI($di);
    }
 
    // Application launch
    public function run()
    {
        // Registering common services for all modules
        $this->registerServices();
 
        // Registering application modules
        $this->registerModules([
            'frontend' => [
                'className' => 'AmberEdge\Frontend\Module',
                'path' => join('', [
                    $this->di['cfg']->app->app_path,
                    join(DIRECTORY_SEPARATOR, [
                        'frontend',
                        'Module.php'
                    ])
                ])
            ],
            'backend' => [
                'className' => 'AmberEdge\Backend\Module',
                'path' => join('', [
                    $this->di['cfg']->app->app_path,
                    join(DIRECTORY_SEPARATOR, [
                        'backend',
                        'Module.php'
                    ])
                ])
            ],
        ]);
 
        $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
        $response = $this->handle($requestUri);
        $response->send();
    }
}
#4AmberEdge\Application->run
/home/bh61542/amberedge.ru/public/index.php (136)
<?php
 
declare(strict_types=1);
 
namespace AmberEdge;
 
use Phalcon\Support\Debug;
use Phalcon\Support\Debug\Exception;
 
/**
 * Bootstrap for App
 * @copyright 2023+ AmberEdge
 * @link http://amberedge.ru
 * @author Pavel Vecherin (vpa2k) <vecherins@gmail.com>
 */
 
// System requirements
define('USED_PHP_VERSION', '8.1.21');
define('USED_PHALCON_VERSION', '5.2.1');
 
// Main settings
define('LOCAL_SERVER', isset($_ENV['COMPOSE_PROJECT_NAME']));
define('DEBUG_MODE', 0);
 
function stop($value)
{
    if (DEBUG_MODE)
    {
        $template = '<p style="color: red">%s</p>';
        echo sprintf($template, $value);
    }
    die;
}
 
// Check PHP version
$php_version = phpversion();
if (!version_compare($php_version, USED_PHP_VERSION, '>='))
{
    stop(join(' ', [
        sprintf('The current version (%s) of PHP is not supported.', $php_version),
        sprintf('Please use PHP version %s or higher.', USED_PHP_VERSION)
    ]));
}
 
// Verifying the installation of the Phalcon extension
if (!extension_loaded('phalcon'))
{
    stop(join(' ', [
        'The Phalcon extension is not available.',
        'Please enable the Phalcon extension on your web server to continue.',
    ]));
}
 
// Checking the version of the Phalcon extension
$phalcon_version = phpversion('phalcon');
if (!version_compare($phalcon_version, USED_PHALCON_VERSION, '>='))
{
    stop(join(' ', [
        sprintf('The current version (%s) of Phalcon extension is not supported.', $phalcon_version),
        sprintf('Please use the Phalcon extension version %s or higher.', USED_PHALCON_VERSION)
    ]));
}
 
// Defining the timezone
define('TZ', isset($_ENV['TZ']) ? $_ENV['TZ'] : 'Europe/Moscow');
 
// Defining the default timezone
date_default_timezone_set(TZ);
 
// Defining the protocol to use
define('PROTOCOL', isset($_SERVER['HTTPS']) ? 'https' : 'http');
 
// Domain name definition
define('DN', isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost');
 
// Defining the root URL
define('ROOT_HTTP', PROTOCOL . '://' . DN . '/');
 
// Defining the base path
define('BASE_PATH', realpath('..') . DIRECTORY_SEPARATOR);
 
// Defining the application directory
define('APP_DIR', 'app' . DIRECTORY_SEPARATOR);
 
// Defining the application path
define('APP_PATH', BASE_PATH . APP_DIR);
 
// Defining the config directory
define('CFG_DIR', 'config' . DIRECTORY_SEPARATOR);
 
// Defining the config path
define('CFG_PATH', APP_PATH . CFG_DIR);
 
// Defining the application temporary directory
define('TMP_DIR', 'tmp' . DIRECTORY_SEPARATOR);
 
// Defining the application path to temporary directory
define('TMP_PATH', BASE_PATH . TMP_DIR);
 
if (!is_dir(TMP_PATH))
{
    if (!mkdir(TMP_PATH, 0700))
    {
        stop(sprintf('Please create a directory "%s".', rtrim(TMP_DIR, '/')));
    }
}
 
// Configuration option
if (DEBUG_MODE)
{
    error_reporting(-1);
    ini_set('display_errors', '1');
    ini_set('display_startup_errors', '1');
}
else
{
    error_reporting(0);
    ini_set('display_errors', 0);
    ini_set('display_startup_errors', 0);
}
 
try
{
    /**
     * Debugging Application
     * @see https://docs.phalcon.io/5.0/en/support-debug
     */
    $debug = new Debug();
    $debug->listen();
 
    // Loading the general application class
    require_once APP_PATH . 'Common.php';
 
    // Creating and running the application
    $app = new Application();
    $app->run();
}
catch (Exception $e)
{
    stop(join('<br>', array
    (
        '--[ Exception ]--',
        'Message: ' . $e->getMessage(),
        'Code: ' . $e->getCode(),
        'Line: ' . $e->getLine(),
        'File: ' . $e->getFile(),
        'Trace: ' . $e->getTraceAsString(),
    )));
}
KeyValue
_url/ru/feedback/
KeyValue
PATH/usr/local/bin:/usr/bin:/bin
TEMP/tmp
TMP/tmp
TMPDIR/tmp
PWD/
LSCAPI_CRIU_SYNC_FD7
HTTP_ACCEPT*/*
CONTENT_LENGTH0
HTTP_HOSTamberedge.ru
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_X_HTTPS1
REDIRECT_REDIRECT_UNIQUE_IDZjPBa2T-FczYFOJvG_6evQAB2BI
REDIRECT_REDIRECT_SCRIPT_URL/ru/feedback/
REDIRECT_REDIRECT_SCRIPT_URIhttps://amberedge.ru/ru/feedback/
REDIRECT_REDIRECT_HTTPSon
REDIRECT_REDIRECT_SSL_TLS_SNIamberedge.ru
REDIRECT_REDIRECT_HTTP2on
REDIRECT_REDIRECT_H2PUSHoff
REDIRECT_REDIRECT_H2_PUSHoff
REDIRECT_REDIRECT_H2_PUSHED
REDIRECT_REDIRECT_H2_PUSHED_ON
REDIRECT_REDIRECT_H2_STREAM_ID1
REDIRECT_REDIRECT_H2_STREAM_TAG3521903-577-1
REDIRECT_REDIRECT_STATUS200
REDIRECT_UNIQUE_IDZjPBa2T-FczYFOJvG_6evQAB2BI
REDIRECT_SCRIPT_URL/ru/feedback/
REDIRECT_SCRIPT_URIhttps://amberedge.ru/ru/feedback/
REDIRECT_HTTPSon
REDIRECT_SSL_TLS_SNIamberedge.ru
REDIRECT_HTTP2on
REDIRECT_H2PUSHoff
REDIRECT_H2_PUSHoff
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_STREAM_ID1
REDIRECT_H2_STREAM_TAG3521903-577-1
REDIRECT_STATUS200
UNIQUE_IDZjPBa2T-FczYFOJvG_6evQAB2BI
SCRIPT_URL/ru/feedback/
SCRIPT_URIhttps://amberedge.ru/ru/feedback/
HTTPSon
SSL_TLS_SNIamberedge.ru
HTTP2on
H2PUSHoff
H2_PUSHoff
H2_PUSHED
H2_PUSHED_ON
H2_STREAM_ID1
H2_STREAM_TAG3521903-577-1
SERVER_SIGNATURE
SERVER_SOFTWAREApache
SERVER_NAMEamberedge.ru
SERVER_ADDR91.219.194.4
SERVER_PORT443
REMOTE_ADDR18.223.196.211
DOCUMENT_ROOT/home/bh61542/amberedge.ru
REQUEST_SCHEMEhttps
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT/home/bh61542/amberedge.ru
SERVER_ADMINwebmaster@amberedge.solarlance.ru
SCRIPT_FILENAME/home/bh61542/amberedge.ru/public/index.php
REMOTE_PORT27079
REDIRECT_URL/public/ru/feedback/
REDIRECT_QUERY_STRING_url=/ru/feedback/
SERVER_PROTOCOLHTTP/2.0
REQUEST_METHODGET
QUERY_STRING_url=/ru/feedback/
REQUEST_URI/ru/feedback/
SCRIPT_NAME/public/index.php
PHP_SELF/public/index.php
REQUEST_TIME_FLOAT1714667883.4733
REQUEST_TIME1714667883
#Path
0/home/bh61542/amberedge.ru/public/index.php
1/home/bh61542/amberedge.ru/app/Common.php
2/home/bh61542/amberedge.ru/app/Config.php
3/home/bh61542/amberedge.ru/app/config/routes.php
4/home/bh61542/amberedge.ru/app/frontend/Module.php
5/home/bh61542/amberedge.ru/vendor/autoload.php
6/home/bh61542/amberedge.ru/vendor/composer/autoload_real.php
7/home/bh61542/amberedge.ru/vendor/composer/ClassLoader.php
8/home/bh61542/amberedge.ru/vendor/composer/autoload_static.php
9/home/bh61542/amberedge.ru/app/lib/funcs/general.php
10/home/bh61542/amberedge.ru/app/lib/funcs/markup.php
11/home/bh61542/amberedge.ru/app/frontend/controllers/FeedbackController.php
12/home/bh61542/amberedge.ru/app/frontend/controllers/ControllerBase.php
13/home/bh61542/amberedge.ru/app/frontend/lib/Tag.php
14/home/bh61542/amberedge.ru/app/frontend/lib/Localization.php
15/home/bh61542/amberedge.ru/app/frontend/langs/ru/template.php
16/home/bh61542/amberedge.ru/app/frontend/langs/ru/feedback__index.php
17/home/bh61542/amberedge.ru/app/frontend/forms/FeedbackForm.php
Memory
Usage2097152