Phalcon Framework 5.6.0

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

/var/www/ai.mygreatdeals.shop/www/apps/auth/controllers/IndexController.php (58)
#0Phalcon\Support\Debug->onUncaughtLowSeverity
#1Phalcon\Mvc\Model::findFirst
/var/www/ai.mygreatdeals.shop/www/apps/auth/controllers/IndexController.php (58)
<?php
 
 
namespace App\Auth\Controllers;
 
use App\Admin\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'], AI_VERSION );
        
        $this->assets
            ->collection('footerCSS');
    }
    
    protected function initJs(){
        
        $this->assets
            ->collection('headerJS');
        
        $this->assets
            ->collection('footerJS')
            ->addJs('/assets/auth/js/app.js', true, true, [], AI_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/ai.mygreatdeals.shop/www/public/index.php (74)
<?php
 
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
 
date_default_timezone_set('UTC');
 
 
const AI_VERSION = '1.0.0';
const AI_CURRENCY = 'USD';
define( 'DOMAIN', $_SERVER['SERVER_NAME'] );
define( 'HOME_URL', 'https://' . DOMAIN );
define( 'API_URL', HOME_URL . '/rest-admin/v1' );
define( 'BASE_PATH', dirname( __DIR__ ) );
const APP_PATH = BASE_PATH . '/apps';
const UPLOAD_PATH = BASE_PATH . '/public';
const UPLOAD_FOLDER = '/uploads';
const FILES_FOLDER = BASE_PATH . '/files';
 
const GPT_KEY    = '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';
 
//REST  API
const API_PUBLIC = 'LZDJSL5B1QBBXOAQD3TDC1CY8M346HZ';
const API_SECRET = 'P18KOF17IGCC6VQBQIZC9IU1UKP6IQB';
 
//AUTH
const SECRET_KEY = 'MNUN9UQD17TM77A86LY2S1EJBUJ8JZO';
 
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'
            ],
            'frontend' => [
                'className' => 'App\Frontend\Module',
                'path'      => APP_PATH . '/frontend/Module.php'
            ],
            'rest'  => [
                'className' => 'App\Rest\Module',
                'path'      => APP_PATH . '/rest/Module.php'
            ],
        ] );
 
        try {
            $response = $this->handle( $_SERVER["REQUEST_URI"] );
            $response->send();
 
        } catch ( \Exception $e ) {
 
            echo $e->getMessage();
            echo $e->getCode();
            echo $e->getFile();
            echo $e->getLine();
//            echo $e->getTrace();
            echo $e->getTraceAsString();
 
        }
    }
 
    /**
     * Зарегистрация сервисов, чтобы сделать их общими, или в ModuleDefinition, чтобы сделать их специфичными для модуля.
     */
    protected function registerServices() {
 
        $di     = new FactoryDefault();
        $loader = new Loader();
 
        $loader
            ->setDirectories( [
                APP_PATH . '/vendor/',
                APP_PATH . '/helper/',
            ] )
            ->register();
 
        // Registering a router
        $di->set( 'router', function () {
 
            $router = new Router(false);
 
            $router->setDefaultModule("frontend");
    
            $router->add('/', [
                'module'     => 'admin',
                'controller' => 'index',
                'action'     => 'checkAuth',
            ])->setName('admin');
            
            $router->add('/login[/]{0,1}', [
                '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-admin/v1/:controller/:action', [
                'module'     => 'admin',
                'controller' => 1,
                'action'     => 2,
            ])->setName('backend-rest');
 
            $router->add('/rest/v1/:controller/:action', [
                'module'     => 'rest',
                'controller' => 1,
                'action'     => 2,
            ])->setName('rest');
            
            $router->notFound( [
                'module'     => 'auth',
                'controller' => 'index',
                'action'     => 'login'
            ] );
            
            return $router;
        } );
 
        $this->setDI($di);
    }
}
 
$application = new Application();
 
$application->main();
#6Application->main
/var/www/ai.mygreatdeals.shop/www/public/index.php (158)
<?php
 
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
 
date_default_timezone_set('UTC');
 
 
const AI_VERSION = '1.0.0';
const AI_CURRENCY = 'USD';
define( 'DOMAIN', $_SERVER['SERVER_NAME'] );
define( 'HOME_URL', 'https://' . DOMAIN );
define( 'API_URL', HOME_URL . '/rest-admin/v1' );
define( 'BASE_PATH', dirname( __DIR__ ) );
const APP_PATH = BASE_PATH . '/apps';
const UPLOAD_PATH = BASE_PATH . '/public';
const UPLOAD_FOLDER = '/uploads';
const FILES_FOLDER = BASE_PATH . '/files';
 
const GPT_KEY    = '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';
 
//REST  API
const API_PUBLIC = 'LZDJSL5B1QBBXOAQD3TDC1CY8M346HZ';
const API_SECRET = 'P18KOF17IGCC6VQBQIZC9IU1UKP6IQB';
 
//AUTH
const SECRET_KEY = 'MNUN9UQD17TM77A86LY2S1EJBUJ8JZO';
 
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'
            ],
            'frontend' => [
                'className' => 'App\Frontend\Module',
                'path'      => APP_PATH . '/frontend/Module.php'
            ],
            'rest'  => [
                'className' => 'App\Rest\Module',
                'path'      => APP_PATH . '/rest/Module.php'
            ],
        ] );
 
        try {
            $response = $this->handle( $_SERVER["REQUEST_URI"] );
            $response->send();
 
        } catch ( \Exception $e ) {
 
            echo $e->getMessage();
            echo $e->getCode();
            echo $e->getFile();
            echo $e->getLine();
//            echo $e->getTrace();
            echo $e->getTraceAsString();
 
        }
    }
 
    /**
     * Зарегистрация сервисов, чтобы сделать их общими, или в ModuleDefinition, чтобы сделать их специфичными для модуля.
     */
    protected function registerServices() {
 
        $di     = new FactoryDefault();
        $loader = new Loader();
 
        $loader
            ->setDirectories( [
                APP_PATH . '/vendor/',
                APP_PATH . '/helper/',
            ] )
            ->register();
 
        // Registering a router
        $di->set( 'router', function () {
 
            $router = new Router(false);
 
            $router->setDefaultModule("frontend");
    
            $router->add('/', [
                'module'     => 'admin',
                'controller' => 'index',
                'action'     => 'checkAuth',
            ])->setName('admin');
            
            $router->add('/login[/]{0,1}', [
                '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-admin/v1/:controller/:action', [
                'module'     => 'admin',
                'controller' => 1,
                'action'     => 2,
            ])->setName('backend-rest');
 
            $router->add('/rest/v1/:controller/:action', [
                'module'     => 'rest',
                'controller' => 1,
                'action'     => 2,
            ])->setName('rest');
            
            $router->notFound( [
                'module'     => 'auth',
                'controller' => 'index',
                'action'     => 'login'
            ] );
            
            return $router;
        } );
 
        $this->setDI($di);
    }
}
 
$application = new Application();
 
$application->main();
KeyValue
_url/login
KeyValue
REDIRECT_REDIRECT_HTTPSon
REDIRECT_REDIRECT_SSL_TLS_SNIrealgarfield.com
REDIRECT_REDIRECT_STATUS200
REDIRECT_HTTPSon
REDIRECT_SSL_TLS_SNIrealgarfield.com
REDIRECT_STATUS200
HTTPSon
SSL_TLS_SNIrealgarfield.com
HTTP_HOSTrealgarfield.com
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip
HTTP_X_FORWARDED_FOR35.175.201.191
HTTP_CF_RAY85b145232bc928c6-IAD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGEen-US,en;q=0.5
HTTP_CF_CONNECTING_IP35.175.201.191
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS
PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
SERVER_SIGNATURE<address>Apache/2.4.38 (Debian) Server at realgarfield.com Port 443</address>\n
SERVER_SOFTWAREApache/2.4.38 (Debian)
SERVER_NAMErealgarfield.com
SERVER_ADDR108.62.121.114
SERVER_PORT443
REMOTE_ADDR172.71.223.31
DOCUMENT_ROOT/var/www/ai.mygreatdeals.shop/www/
REQUEST_SCHEMEhttps
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT/var/www/ai.mygreatdeals.shop/www/
SERVER_ADMIN[no address given]
SCRIPT_FILENAME/var/www/ai.mygreatdeals.shop/www/public/index.php
REMOTE_PORT56388
REDIRECT_URL/public/login
REDIRECT_QUERY_STRING_url=/login
GATEWAY_INTERFACECGI/1.1
SERVER_PROTOCOLHTTP/1.1
REQUEST_METHODGET
QUERY_STRING_url=/login
REQUEST_URI/login
SCRIPT_NAME/public/index.php
PHP_SELF/public/index.php
REQUEST_TIME_FLOAT1708877967.8774
REQUEST_TIME1708877967
#Path
0/var/www/ai.mygreatdeals.shop/www/public/index.php
1/var/www/ai.mygreatdeals.shop/www/apps/filters.php
2/var/www/ai.mygreatdeals.shop/www/apps/core.php
3/var/www/ai.mygreatdeals.shop/www/apps/library/vendor/autoload.php
4/var/www/ai.mygreatdeals.shop/www/apps/library/vendor/composer/autoload_real.php
5/var/www/ai.mygreatdeals.shop/www/apps/library/vendor/composer/platform_check.php
6/var/www/ai.mygreatdeals.shop/www/apps/library/vendor/composer/ClassLoader.php
7/var/www/ai.mygreatdeals.shop/www/apps/library/vendor/composer/autoload_static.php
8/var/www/ai.mygreatdeals.shop/www/apps/library/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php
9/var/www/ai.mygreatdeals.shop/www/apps/auth/Module.php
10/var/www/ai.mygreatdeals.shop/www/apps/auth/controllers/IndexController.php
11/var/www/ai.mygreatdeals.shop/www/apps/vendor/Auth/Auth.php
12/var/www/ai.mygreatdeals.shop/www/apps/admin/models/Options.php
Memory
Usage2097152