Phalcon Framework 5.6.0

ArgumentCountError: Phalcon\Support\Debug::onUncaughtLowSeverity() expects exactly 5 arguments, 4 given

/var/www/service-micro.mygreatdeals.shop/www/apps/auth/controllers/IndexController.php (58)
#0Phalcon\Support\Debug->onUncaughtLowSeverity
#1Phalcon\Mvc\Model::findFirst
/var/www/service-micro.mygreatdeals.shop/www/apps/auth/controllers/IndexController.php (58)
<?php
 
 
namespace App\Auth\Controllers;
 
use App\Backend\Models\Options;
use Auth\Auth;
use Phalcon\Mvc\Controller;
 
class IndexController extends Controller {
    
    private $auth;
    
    public function onConstruct() {
    
        $this->auth = Auth::isAuth();
    }
    
    public function initialize() {
        
        $this->initCss();
        $this->initJs();
 
        $this->view->setVar('domain', DOMAIN);
        $this->view->setVar('api_url', API_URL);
    }
    
    protected function initCss(){
        
        $this->assets
            ->collection('headerCSS')
            ->addCss('//fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons', false, true, ['rel' => 'stylesheet'] );
 
        $this->assets
            ->collection('headerCSS')
            ->addCss('https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css', false, true, ['rel' => 'stylesheet'] );
 
        $this->assets
            ->collection('headerCSS')
            ->addCss('/assets/auth/css/app.css', true, true, ['rel' => 'stylesheet'], RT_VERSION );
        
        $this->assets
            ->collection('footerCSS');
    }
    
    protected function initJs(){
        
        $this->assets
            ->collection('headerJS');
        
        $this->assets
            ->collection('footerJS')
            ->addJs('/assets/auth/js/app.js', true, true, [], RT_VERSION);
    }
    
    public function indexAction() {
        
        $option = Options::findFirst( "option_name = 'recaptcha_settings'" );
    
        $recaptcha = Options::prepareCaptcha(
            $option ? maybe_unserialize( $option->option_value ) : []
        );
    
        $this->view->setVar('recaptcha_status', $recaptcha['status'] ? $recaptcha['status'] : 0 );
        $this->view->setVar('recaptcha_site_key', $recaptcha['site_key'] );
    }
    
    public function loginAction() {
        
        if( ! $this->isAuth() ) {
            header("Location: " . HOME_URL . "/login");
        } else {
            header("Location: " . HOME_URL . "/admin");
        }
        exit();
    }
    
    /**
     * @return false|object
     */
    protected function isAuth() {
        
        return $this->auth ? $this->auth: false;
    }
}
#2App\Auth\Controllers\IndexController->indexAction
#3Phalcon\Dispatcher\AbstractDispatcher->callActionMethod
#4Phalcon\Dispatcher\AbstractDispatcher->dispatch
#5Phalcon\Mvc\Application->handle
/var/www/service-micro.mygreatdeals.shop/www/public/index.php (63)
<?php
 
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
 
date_default_timezone_set('UTC');
 
 
const RT_VERSION = '1.0.0';
define( 'DOMAIN', $_SERVER['SERVER_NAME'] );
define( 'HOME_URL', 'https://' . DOMAIN );
define( 'API_URL', HOME_URL . '/rest/v1' );
define( 'BASE_PATH', dirname( __DIR__ ) );
const APP_PATH = BASE_PATH . '/apps';
const UPLOAD_PATH = BASE_PATH . '/public';
const UPLOAD_FOLDER = '/uploads';
 
 
//REST  API
const API_PUBLIC = 'HWRMUBPJ7DK8FVTG53QCENYX46Z2S9L';
const API_SECRET = 'D9CSLTNZAXR8Y6V74HF3GJ2BWEK5QPM';
 
//AUTH
const SECRET_KEY = 'WT4NRGY3UPAL2JFCM8QZV6XBSDKH579';
 
include APP_PATH . '/filters.php';
include APP_PATH . '/core.php';
 
if( file_exists(APP_PATH . '/library/vendor/autoload.php') ){
    require_once(APP_PATH . '/library/vendor/autoload.php');
}
 
use Phalcon\Autoload\Loader;
use Phalcon\Mvc\Router;
use Phalcon\DI\FactoryDefault;
use Phalcon\Mvc\Application as BaseApplication;
 
$debug = new Phalcon\Support\Debug();
$debug->listenExceptions()
    ->listenLowSeverity()
    ->listen();
 
class Application extends BaseApplication {
 
    public function main() {
 
        $this->registerServices();
 
        // Зарегистрация установленных модулей
        $this->registerModules( [
            'auth' => [ //авторизация пользователей
                'className' => 'App\Auth\Module',
                'path'      => APP_PATH . '/auth/Module.php'
            ],
            'admin'  => [ //админка
                'className' => 'App\Admin\Module',
                'path'      => APP_PATH . '/admin/Module.php'
            ],
        ] );
 
        try {
            $response = $this->handle( $_SERVER["REQUEST_URI"] );
            $response->send();
 
        } catch ( \Exception $e ) {
            echo '<pre>';
            echo $e->getMessage();
            echo " ";
            echo $e->getCode();
            echo "\n";
            echo $e->getFile();
 
            echo '('.$e->getLine().')';
            echo "\n";
            echo $e->getTraceAsString();
            echo '</pre>';
        }
    }
 
    /**
     * Зарегистрация сервисов, чтобы сделать их общими, или в ModuleDefinition, чтобы сделать их специфичными для модуля.
     */
    protected function registerServices() {
 
        $di     = new FactoryDefault();
        $loader = new Loader();
 
        $loader
            ->setDirectories( [
                APP_PATH . '/vendor/'
            ] )
            ->register();
 
        // Registering a router
        $di->set( 'router', function () {
 
            $router = new Router(false);
 
            $router->setDefaultModule("auth");
 
            // нельзя открыть главную страницу не авторизованным
            $router->add('/', [
                'module'     => 'admin',
                'controller' => 'index',
                'action'     => 'checkAuth',
            ])->setName('admin');
 
            // авторизация
            $router->add('/login', [
                'module'     => 'auth',
                'controller' => 'index',
                'action'     => 'index',
            ])->setName('auth');
 
            // открытие страниц в админке
            $router->add('/admin/:params', [
                'module'     => 'admin',
                'controller' => 'index',
                'action'     => 'index',
                'params'     => 1
            ])->setName('admin');
 
            // запросы к REST админке
            $router->add('/rest/v1/:controller/:action', [
                'module'     => 'admin',
                'controller' => 1,
                'action'     => 2,
            ])->setName('rest');
 
            // обработка 404 страниц
            $router->notFound( [
                'module'     => 'auth',
                'controller' => 'index',
                'action'     => 'index'
            ] );
            
            return $router;
        } );
 
        $this->setDI($di);
    }
}
 
$application = new Application();
 
$application->main();
#6Application->main
/var/www/service-micro.mygreatdeals.shop/www/public/index.php (147)
<?php
 
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
 
date_default_timezone_set('UTC');
 
 
const RT_VERSION = '1.0.0';
define( 'DOMAIN', $_SERVER['SERVER_NAME'] );
define( 'HOME_URL', 'https://' . DOMAIN );
define( 'API_URL', HOME_URL . '/rest/v1' );
define( 'BASE_PATH', dirname( __DIR__ ) );
const APP_PATH = BASE_PATH . '/apps';
const UPLOAD_PATH = BASE_PATH . '/public';
const UPLOAD_FOLDER = '/uploads';
 
 
//REST  API
const API_PUBLIC = 'HWRMUBPJ7DK8FVTG53QCENYX46Z2S9L';
const API_SECRET = 'D9CSLTNZAXR8Y6V74HF3GJ2BWEK5QPM';
 
//AUTH
const SECRET_KEY = 'WT4NRGY3UPAL2JFCM8QZV6XBSDKH579';
 
include APP_PATH . '/filters.php';
include APP_PATH . '/core.php';
 
if( file_exists(APP_PATH . '/library/vendor/autoload.php') ){
    require_once(APP_PATH . '/library/vendor/autoload.php');
}
 
use Phalcon\Autoload\Loader;
use Phalcon\Mvc\Router;
use Phalcon\DI\FactoryDefault;
use Phalcon\Mvc\Application as BaseApplication;
 
$debug = new Phalcon\Support\Debug();
$debug->listenExceptions()
    ->listenLowSeverity()
    ->listen();
 
class Application extends BaseApplication {
 
    public function main() {
 
        $this->registerServices();
 
        // Зарегистрация установленных модулей
        $this->registerModules( [
            'auth' => [ //авторизация пользователей
                'className' => 'App\Auth\Module',
                'path'      => APP_PATH . '/auth/Module.php'
            ],
            'admin'  => [ //админка
                'className' => 'App\Admin\Module',
                'path'      => APP_PATH . '/admin/Module.php'
            ],
        ] );
 
        try {
            $response = $this->handle( $_SERVER["REQUEST_URI"] );
            $response->send();
 
        } catch ( \Exception $e ) {
            echo '<pre>';
            echo $e->getMessage();
            echo " ";
            echo $e->getCode();
            echo "\n";
            echo $e->getFile();
 
            echo '('.$e->getLine().')';
            echo "\n";
            echo $e->getTraceAsString();
            echo '</pre>';
        }
    }
 
    /**
     * Зарегистрация сервисов, чтобы сделать их общими, или в ModuleDefinition, чтобы сделать их специфичными для модуля.
     */
    protected function registerServices() {
 
        $di     = new FactoryDefault();
        $loader = new Loader();
 
        $loader
            ->setDirectories( [
                APP_PATH . '/vendor/'
            ] )
            ->register();
 
        // Registering a router
        $di->set( 'router', function () {
 
            $router = new Router(false);
 
            $router->setDefaultModule("auth");
 
            // нельзя открыть главную страницу не авторизованным
            $router->add('/', [
                'module'     => 'admin',
                'controller' => 'index',
                'action'     => 'checkAuth',
            ])->setName('admin');
 
            // авторизация
            $router->add('/login', [
                'module'     => 'auth',
                'controller' => 'index',
                'action'     => 'index',
            ])->setName('auth');
 
            // открытие страниц в админке
            $router->add('/admin/:params', [
                'module'     => 'admin',
                'controller' => 'index',
                'action'     => 'index',
                'params'     => 1
            ])->setName('admin');
 
            // запросы к REST админке
            $router->add('/rest/v1/:controller/:action', [
                'module'     => 'admin',
                'controller' => 1,
                'action'     => 2,
            ])->setName('rest');
 
            // обработка 404 страниц
            $router->notFound( [
                'module'     => 'auth',
                'controller' => 'index',
                'action'     => 'index'
            ] );
            
            return $router;
        } );
 
        $this->setDI($di);
    }
}
 
$application = new Application();
 
$application->main();
KeyValue
_url/sitemap.xml
KeyValue
REDIRECT_REDIRECT_HTTPSon
REDIRECT_REDIRECT_SSL_TLS_SNIservice-micro.mygreatdeals.shop
REDIRECT_REDIRECT_STATUS200
REDIRECT_HTTPSon
REDIRECT_SSL_TLS_SNIservice-micro.mygreatdeals.shop
REDIRECT_STATUS200
HTTPSon
SSL_TLS_SNIservice-micro.mygreatdeals.shop
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT_ENCODINGgzip, br, zstd, deflate
HTTP_HOSTservice-micro.mygreatdeals.shop
PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
SERVER_SIGNATURE<address>Apache/2.4.52 (Ubuntu) Server at service-micro.mygreatdeals.shop Port 443</address>\n
SERVER_SOFTWAREApache/2.4.52 (Ubuntu)
SERVER_NAMEservice-micro.mygreatdeals.shop
SERVER_ADDR108.62.121.114
SERVER_PORT443
REMOTE_ADDR216.73.216.140
DOCUMENT_ROOT/var/www/service-micro.mygreatdeals.shop/www/
REQUEST_SCHEMEhttps
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT/var/www/service-micro.mygreatdeals.shop/www/
SERVER_ADMIN[no address given]
SCRIPT_FILENAME/var/www/service-micro.mygreatdeals.shop/www/public/index.php
REMOTE_PORT13512
REDIRECT_URL/public/sitemap.xml
REDIRECT_QUERY_STRING_url=/sitemap.xml
GATEWAY_INTERFACECGI/1.1
SERVER_PROTOCOLHTTP/1.1
REQUEST_METHODGET
QUERY_STRING_url=/sitemap.xml
REQUEST_URI/sitemap.xml
SCRIPT_NAME/public/index.php
PHP_SELF/public/index.php
REQUEST_TIME_FLOAT1765005456.182
REQUEST_TIME1765005456
#Path
0/var/www/service-micro.mygreatdeals.shop/www/public/index.php
1/var/www/service-micro.mygreatdeals.shop/www/apps/filters.php
2/var/www/service-micro.mygreatdeals.shop/www/apps/core.php
3/var/www/service-micro.mygreatdeals.shop/www/apps/library/vendor/autoload.php
4/var/www/service-micro.mygreatdeals.shop/www/apps/library/vendor/composer/autoload_real.php
5/var/www/service-micro.mygreatdeals.shop/www/apps/library/vendor/composer/platform_check.php
6/var/www/service-micro.mygreatdeals.shop/www/apps/library/vendor/composer/ClassLoader.php
7/var/www/service-micro.mygreatdeals.shop/www/apps/library/vendor/composer/autoload_static.php
8/var/www/service-micro.mygreatdeals.shop/www/apps/library/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php
9/var/www/service-micro.mygreatdeals.shop/www/apps/auth/Module.php
10/var/www/service-micro.mygreatdeals.shop/www/apps/auth/controllers/IndexController.php
11/var/www/service-micro.mygreatdeals.shop/www/apps/vendor/Auth/Auth.php
12/var/www/service-micro.mygreatdeals.shop/www/apps/backend/models/Options.php
Memory
Usage2097152