Phalcon Framework 3.4.0

Error: Call to undefined method stdClass::update()

/home/ubuntu/sosongking/app/Controllers/Angry/InfoController.php (138)
#0Sosongking\Controllers\Angry\InfoController->detailAction(5)
#1Phalcon\Dispatcher->callActionMethod(Object(Sosongking\Controllers\Angry\InfoController), detailAction, Array([0] => 5))
#2Phalcon\Dispatcher->dispatch()
#3Phalcon\Mvc\Application->handle()
/home/ubuntu/sosongking/app/Bootstrap.php (221)
<?php
/**
 * Created by PhpStorm.
 * User: KHW
 * Date: 2017-09-14
 * Time: 오후 11:20
 */
 
namespace Sosongking;
 
 
use Phalcon\Crypt;
use Phalcon\Events\Manager;
use Phalcon\Mvc\Application;
use Phalcon\Di\FactoryDefault;
use Phalcon\Mvc\Dispatcher;
use Phalcon\Mvc\View;
use Phalcon\Mvc\View\Engine\Php as PhpEngine;
use Phalcon\Mvc\Url as UrlResolver;
use Phalcon\Mvc\View\Engine\Volt as VoltEngine;
use Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter;
use Phalcon\Flash\Session as FlashSession;
use Sosongking\Library\Auth;
use Sosongking\Library\Tags;
use Sosongking\Plugins\DispatchPlugin;
use Sosongking\Plugins\RouterPlugin;
 
 
class Bootstrap extends Application
{
    public function __construct()
    {
        $di = new FactoryDefault();
 
        $config = include 'config/config.php';
 
        /**
         * Shared configuration service
         */
        $di->setShared('config', $config);
 
        include APP_PATH . "/config/loader.php";
 
 
        $di->setShared('router', function () {
            $router =  require APP_PATH . '/config/routes.php';
 
            $eventsManager = new Manager();
            $eventsManager->attach("router",new RouterPlugin());
            $router->setEventsManager($eventsManager);
            return $router;
        });
 
 
        /**
         * The URL component is used to generate all kind of urls in the application
         */
        $di->setShared('url', function () {
            $config = $this->getConfig();
 
            $url = new UrlResolver();
            $url->setBaseUri($config->application->baseUri);
 
            return $url;
        });
 
        /**
         * Setting up the view component
         */
        $di->setShared('view', function () {
            $config = $this->getConfig();
 
            $view = new View();
            $view->setDI($this);
            $view->setViewsDir($config->application->viewsDir);
 
            $view->registerEngines([
                '.volt' => function ($view) {
                    $config = $this->getConfig();
 
                    $volt = new VoltEngine($view, $this);
 
                    $volt->setOptions([
                        'compiledPath' => $config->application->cacheDir,
                        'compiledSeparator' => '_'
                    ]);
 
                    return $volt;
                },
                '.phtml' => PhpEngine::class
 
            ]);
 
//            $ev = new Manager();
//            $ev->attach("view", function($event, $view)  {
//                if ($event->getType() == 'notFoundView') {
////                    if (!empty($view->getActiveRenderPath()))
////                    {
//
////                        var_dump($view->getActiveRenderPath());
//
//
////                    }
////                    $this->registry->view[] = $view->getActiveRenderPath();
//
//                    throw new \Exception('View not found' . var_dump($view->getActiveRenderPath()));
//                }
//            });
//            $view->setEventsManager($ev);
 
            return $view;
        });
 
 
        /**
         * Database connection is created based in the parameters defined in the configuration file
         */
        $di->setShared('db', function () {
            $config = $this->getConfig();
 
            $class = 'Phalcon\Db\Adapter\Pdo\\' . $config->database->adapter;
            $params = [
                'host'     => $config->database->host,
                'username' => $config->database->username,
                'password' => $config->database->password,
                'dbname'   => $config->database->dbname,
                'charset'  => $config->database->charset
            ];
 
            if ($config->database->adapter == 'Postgresql') {
                unset($params['charset']);
            }
 
            $connection = new $class($params);
 
            return $connection;
        });
 
 
        /**
         * If the configuration specify the use of metadata adapter use it or use memory otherwise
         */
        $di->setShared('modelsMetadata', function () {
            return new MetaDataAdapter();
        });
 
        /**
         * Register the session flash service with the Twitter Bootstrap classes
         */
        $di->set('flash', function () {
            return new FlashSession([
                'error'   => 'alert alert-danger',
                'success' => 'alert alert-success',
                'notice'  => 'alert alert-info',
                'warning' => 'alert alert-warning'
            ]);
        });
 
        /**
         * Start the session the first time some component request the session service
         */
        $di->setShared('session', function () {
            $db = $this->get("db");
            $session = new \Sosongking\Library\SessionDb([
                'db' => $db,
                'table' => 'session_data'
            ]);
            $session->start();
            return $session;
        });
 
 
        $di->set('dispatcher', function ()  {
            $dispatcher = new Dispatcher();
            $dispatcher->setDefaultNamespace('Sosongking\Controllers');
            $eventsManager = new Manager();
            $eventsManager->attach("dispatch",new DispatchPlugin());
            $dispatcher->setEventsManager($eventsManager);
 
            return $dispatcher;
        });
 
        $di->set('tag', function () {
 
            return new Tags();
        });
 
        $di->set('auth', function () {
            return new Auth();
        });
 
        $di->set(
            "crypt",
            function () {
                $crypt = new Crypt();
 
                $crypt->setKey('H+MbQeThVmYq3t6w9z$C&F)J@NcRfUjXnZr4u7x!A%D*G-KaPdSgVkYp3s5v8y/B'); // Use your own key!
 
                return $crypt;
            }
        );
 
        $di->setShared('helper', function () {
 
            return new Plugins\Helper();
        });
 
        parent::__construct($di);
    }
 
    public function run()
    {
 
 
 
    }
 
 
    public function getOutput()
    {
        return $this->handle()->getContent();
    }
}
 
#4Sosongking\Bootstrap->getOutput()
/home/ubuntu/sosongking/public/index.php (40)
<?php
error_reporting(E_ALL);
 
define('BASE_PATH', dirname(__DIR__));
define('APP_PATH', BASE_PATH . '/app');
 
if ($_SERVER['REMOTE_ADDR'] == '61.38.45.113' || $_SERVER['REMOTE_ADDR']  == '127.0.0.1'
    || $_SERVER['REMOTE_ADDR'] == '172.18.0.1' || $_SERVER['HTTP_X_FORWARDED_FOR'] == '61.38.45.113'
)
{
    define('OFFICE', TRUE);
}
 
if ( $_SERVER['REMOTE_ADDR']  == '127.0.0.1' || $_SERVER['HTTP_X_FORWARDED_FOR'] == '127.0.0.1')
{
    define('LOCAL', TRUE);
}
 
//if (strtotime("2018-08-13 00:00:00") < time()){
//    include "service.html";
//    exit;
//}
 
 
$debug = new \Phalcon\Debug();
$debug->listen();
 
 
try {
 
    /**
     *  Include Composer Autoload
     */
    include BASE_PATH . '/vendor/autoload.php';
    require_once  '../app/Bootstrap.php';
 
 
    $bootstrap = new \Sosongking\Bootstrap();
    $bootstrap->run();
    echo $bootstrap->getOutput();
} catch (\Exception $e) {
    echo $e->getMessage() . '<br>';
    echo '<pre>' . $e->getTraceAsString() . '</pre>';
}
KeyValue
_url/info/detail/5
KeyValue
USERwww-data
HOME/var/www
HTTP_ACCEPT_ENCODINGgzip
HTTP_IF_MODIFIED_SINCESat, 15 Dec 2018 22:52:49 GMT
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_X_AMZN_TRACE_IDRoot=1-5c67b901-c8d3643c71b00e38ff643358
HTTP_HOSTwww.angrypeople.co.kr
HTTP_X_FORWARDED_PORT443
HTTP_X_FORWARDED_PROTOhttps
HTTP_X_FORWARDED_FOR34.203.28.212
SCRIPT_FILENAME/home/ubuntu/sosongking/public/index.php
PATH_TRANSLATED/home/ubuntu/sosongking/public
REDIRECT_STATUS200
SERVER_NAMElocalhost
SERVER_PORT80
SERVER_ADDR172.31.5.105
REMOTE_PORT51422
REMOTE_ADDR172.31.10.174
SERVER_SOFTWAREnginx/1.15.0
GATEWAY_INTERFACECGI/1.1
REQUEST_SCHEMEhttp
SERVER_PROTOCOLHTTP/1.1
DOCUMENT_ROOT/home/ubuntu/sosongking/public
DOCUMENT_URI/index.php
REQUEST_URI/info/detail/5
SCRIPT_NAME/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHODGET
QUERY_STRING_url=/info/detail/5&
FCGI_ROLERESPONDER
PHP_SELF/index.php
REQUEST_TIME_FLOAT1550301441.3381
REQUEST_TIME1550301441
#Path
0/home/ubuntu/sosongking/public/index.php
1/home/ubuntu/sosongking/vendor/autoload.php
2/home/ubuntu/sosongking/vendor/composer/autoload_real.php
3/home/ubuntu/sosongking/vendor/composer/ClassLoader.php
4/home/ubuntu/sosongking/vendor/composer/autoload_static.php
5/home/ubuntu/sosongking/vendor/guzzlehttp/psr7/src/functions_include.php
6/home/ubuntu/sosongking/vendor/guzzlehttp/psr7/src/functions.php
7/home/ubuntu/sosongking/vendor/guzzlehttp/promises/src/functions_include.php
8/home/ubuntu/sosongking/vendor/guzzlehttp/promises/src/functions.php
9/home/ubuntu/sosongking/vendor/guzzlehttp/guzzle/src/functions_include.php
10/home/ubuntu/sosongking/vendor/guzzlehttp/guzzle/src/functions.php
11/home/ubuntu/sosongking/vendor/mtdowling/jmespath.php/src/JmesPath.php
12/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/adjoint.php
13/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/antidiagonal.php
14/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/cofactors.php
15/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/determinant.php
16/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/diagonal.php
17/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/identity.php
18/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/inverse.php
19/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/minors.php
20/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/trace.php
21/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/functions/transpose.php
22/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/operations/add.php
23/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/operations/directsum.php
24/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/operations/subtract.php
25/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/operations/multiply.php
26/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/operations/divideby.php
27/home/ubuntu/sosongking/vendor/markbaker/matrix/classes/src/operations/divideinto.php
28/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/abs.php
29/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/acos.php
30/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/acosh.php
31/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/acot.php
32/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/acoth.php
33/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/acsc.php
34/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/acsch.php
35/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/argument.php
36/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/asec.php
37/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/asech.php
38/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/asin.php
39/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/asinh.php
40/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/atan.php
41/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/atanh.php
42/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/conjugate.php
43/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/cos.php
44/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/cosh.php
45/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/cot.php
46/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/coth.php
47/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/csc.php
48/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/csch.php
49/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/exp.php
50/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/inverse.php
51/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/ln.php
52/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/log2.php
53/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/log10.php
54/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/negative.php
55/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/pow.php
56/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/rho.php
57/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/sec.php
58/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/sech.php
59/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/sin.php
60/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/sinh.php
61/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/sqrt.php
62/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/tan.php
63/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/tanh.php
64/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/functions/theta.php
65/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/operations/add.php
66/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/operations/subtract.php
67/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/operations/multiply.php
68/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/operations/divideby.php
69/home/ubuntu/sosongking/vendor/markbaker/complex/classes/src/operations/divideinto.php
70/home/ubuntu/sosongking/vendor/facebook/graph-sdk/src/Facebook/polyfills.php
71/home/ubuntu/sosongking/vendor/aws/aws-sdk-php/src/functions.php
72/home/ubuntu/sosongking/app/Bootstrap.php
73/home/ubuntu/sosongking/app/config/config.php
74/home/ubuntu/sosongking/app/config/loader.php
75/home/ubuntu/sosongking/app/config/routes.php
76/home/ubuntu/sosongking/app/Plugins/RouterPlugin.php
77/home/ubuntu/sosongking/app/Plugins/DispatchPlugin.php
78/home/ubuntu/sosongking/app/Library/Auth.php
79/home/ubuntu/sosongking/app/Library/SessionDb.php
80/home/ubuntu/sosongking/app/Library/Acl.php
81/home/ubuntu/sosongking/app/Controllers/Angry/InfoController.php
82/home/ubuntu/sosongking/app/Controllers/Angry/ControllerBase.php
83/home/ubuntu/sosongking/app/Library/Tags.php
84/home/ubuntu/sosongking/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php
85/home/ubuntu/sosongking/app/Models/AngryInfo.php
Memory
Usage2097152