Warning!

Fuel\Core\PhpErrorException [ Warning ]:
Creating default object from empty value

APPPATH/classes/model/userviewsummary.php @ line 51

46
47    // インサート
48    public function _event_after_insert()
49    {
50        $user Model_User::find($this->user_id);
51        $user->view_count += 1;
52        $user->save();
53    }
54
55    // アップデート
56    public function _event_after_update()

Backtrace

  1. COREPATH/bootstrap.php @ line 98
    93        include COREPATH.'classes/error.php';
    94        class_alias('\Fuel\Core\Error''Error');
    95        class_alias('\Fuel\Core\PhpErrorException''PhpErrorException');
    96    }
    97
    98    return \Error::error_handler($severity$message$filepath$line);
    99});
    100
    101function setup_autoloader()
    102{
    103    Autoloader::add_namespace('Fuel\\Core'COREPATH.'classes/');
    
  2. APPPATH/classes/model/userviewsummary.php @ line 51
    46
    47    // インサート
    48    public function _event_after_insert()
    49    {
    50        $user Model_User::find($this->user_id);
    51        $user->view_count += 1;
    52        $user->save();
    53    }
    54
    55    // アップデート
    56    public function _event_after_update()
    
  3. PKGPATH/orm/classes/observer/self.php @ line 33
    28     */
    29    public static function orm_notify(Model $instance$event)
    30    {
    31        if (method_exists($instance$method '_event_'.$event))
    32        {
    33            call_user_func(array($instance$method));
    34        }
    35    }
    36}
    
  4. PKGPATH/orm/classes/model.php @ line 1545
    1540                    $observer $observer_class;
    1541                }
    1542
    1543                try
    1544                {
    1545                    call_user_func(array($observer'orm_notify'), $this$event);
    1546                }
    1547                catch (\Exception $e)
    1548                {
    1549                    // Unfreeze before failing
    1550                    $this->unfreeze();
    
  5. PKGPATH/orm/classes/model.php @ line 1299
    1294        // update the original properties on creation and cache object for future retrieval in this request
    1295        $this->_is_new false;
    1296        $this->_original $this->_data;
    1297        static::$_cached_objects[get_class($this)][static::implode_pk($this)] = $this;
    1298
    1299        $this->observe('after_insert');
    1300
    1301        return $id !== false;
    1302    }
    1303
    1304    /**
    
  6. PKGPATH/orm/classes/model.php @ line 1228
    1223                }
    1224            }
    1225            $this->unfreeze();
    1226
    1227            // Insert or update
    1228            $return $this->_is_new $this->create() : $this->update();
    1229
    1230            $this->freeze();
    1231            foreach($this->relations() as $rel_name => $rel)
    1232            {
    1233                if (array_key_exists($rel_name$this->_data_relations))
    
  7. APPPATH/classes/model/userviewsummary.php @ line 143
    138                $row->user_id $user_id;
    139                $row->date $date;
    140                $row->view 1;
    141                $row->view_ip $ipaddress;
    142                $row->view_user_agent $agent;
    143                $row->save();
    144            }
    145        }
    146    }
    147}
    
  8. APPPATH/classes/controller/index.php @ line 447
    442     * @param type $id
    443     */
    444    public function action_detail($id=0)
    445    {
    446        // 表示数をカウント
    447        Model_Userviewsummary::countup_view($id);
    448
    449        $profile Model_Userprofile::query()
    450            ->where('user_id'$id)
    451            ->where('disp_flg'1)
    452            ->get_one();
    
  9. COREPATH/classes/request.php @ line 444
    439                    // fire any controller started events
    440                    \Event::instance()->has_events('controller_started') and \Event::instance()->trigger('controller_started''''none');
    441
    442                    $class->hasMethod('before') and $class->getMethod('before')->invoke($this->controller_instance);
    443
    444                    $response $action->invokeArgs($this->controller_instance$this->method_params);
    445
    446                    $class->hasMethod('after') and $response $class->getMethod('after')->invoke($this->controller_instance$response);
    447
    448                    // fire any controller finished events
    449                    \Event::instance()->has_events('controller_finished') and \Event::instance()->trigger('controller_finished''''none');
    
  10. DOCROOT/index.php @ line 49
    44require APPPATH.'bootstrap.php';
    45
    46// Generate the request, execute it and send the output.
    47try
    48{
    49    $response Request::forge()->execute()->response();
    50}
    51catch (HttpNotFoundException $e)
    52{
    53    $route array_key_exists('_404_'Router::$routes) ? Router::$routes['_404_']->translation Config::get('routes._404_');
    54