Fuel\Core\PhpErrorException [ Warning ]:
Creating default object from empty value
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()
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/');
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()
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}
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();
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 /**
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))
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}
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();
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');
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