Exception
InvalidArgumentException
Locale `` could not be parsed.
Source
Stack Trace
-
[exception]
/var/www/sites/sportador.japache.net/libraries/lithium/g11n/Locale.php: 132
127 $regex .= '(?:[_-](?P<script>[a-z]{4}))?'; 128 $regex .= '(?:[_-](?P<territory>[a-z]{2}))?'; 129 $regex .= '(?:[_-](?P<variant>[a-z]{5,}))?'; 130 131 if (!preg_match("/^{$regex}$/i", $locale, $matches)) { 132 throw new InvalidArgumentException("Locale `{$locale}` could not be parsed."); 133 } 134 return array_filter(array_intersect_key($matches, static::$_tags)); 135 } 136 137 /** -
lithium\g11n\Locale::cascade()
/var/www/sites/sportador.japache.net/libraries/lithium/g11n/Locale.php: 176
171 $locales[] = $locale; 172 173 if ($locale === 'root') { 174 return $locales; 175 } 176 $tags = static::decompose($locale); 177 178 while (count($tags) > 1) { 179 array_pop($tags); 180 $locales[] = static::compose($tags); 181 } -
lithium\g11n\Catalog::read()
/var/www/sites/sportador.japache.net/libraries/lithium/g11n/Catalog.php: 89
84 $id = strtok('.'); 85 86 $names = $name === true ? array_keys(static::$_configurations) : (array) $name; 87 $results = []; 88 89 foreach (Locale::cascade($locale) as $cascaded) { 90 foreach ($names as $name) { 91 $adapter = static::adapter($name); 92 93 if ($result = $adapter->read($category, $cascaded, $options['scope'])) { 94 $results += $result; -
lithium\g11n\Message::lithium\g11n\{closure}() @ ?
/var/www/sites/sportador.japache.net/libraries/lithium/g11n/Message.php: 206
201 $id = "{$id}|{$context}"; 202 } 203 204 if (!isset(static::$_cachedPages[$options['scope']][$locale])) { 205 static::$_cachedPages[$options['scope']][$locale] = Catalog::read( 206 true, 'message', $locale, $options 207 ); 208 } 209 $page = static::$_cachedPages[$options['scope']][$locale]; 210 211 if (!isset($page[$id])) { -
lithium\aop\Filters::run()
/var/www/sites/sportador.japache.net/libraries/lithium/aop/Filters.php: 231
226 */ 227 public static function run($class, $method, array $params, $implementation) { 228 $implementation = static::_bcImplementation($class, $method, $params, $implementation); 229 230 if (!static::hasApplied($class, $method)) { 231 return $implementation($params); 232 } 233 return static::_chain($class, $method)->run($params, $implementation); 234 } 235 236 /** -
lithium\g11n\Message::_translated()
/var/www/sites/sportador.japache.net/libraries/lithium/g11n/Message.php: 226
221 $key = $page['pluralRule']($count); 222 223 if (isset($page[$id][$key])) { 224 return $page[$id][$key]; 225 } 226 }); 227 } 228} 229 230 -
lithium\g11n\Message::translate()
/var/www/sites/sportador.japache.net/libraries/lithium/g11n/Message.php: 116
111 if ($options['noop']) { 112 $result = null; 113 } else { 114 $result = static::_translated($id, abs($options['count']), $options['locale'], [ 115 'scope' => $options['scope'], 116 'context' => $options['context'] 117 ]); 118 } 119 120 if ($result = $result ?: $options['default']) { 121 return strpos($result, '{:') !== false ? Text::insert($result, $options) : $result; -
app\controllers\AccountsController::login()
/var/www/sites/sportador.japache.net/app/controllers/AccountsController.php: 126
121 UserSessions::writeLog(); 122 $this->redirect('Accounts::index'); 123 } 124 125 $message = 'Login failed. Please try again'; 126 $this->set(['error' => Message::translate($message, ['default' => $message])]); 127 } 128 129 public function logout() { 130 Auth::clear('default'); 131 Session::clear(); -
lithium\core\Object::invokeMethod()
/var/www/sites/sportador.japache.net/libraries/lithium/core/Object.php: 138
133 * @return mixed Returns the result of the method call 134 */ 135 public function invokeMethod($method, $params = []) { 136 switch (count($params)) { 137 case 0: 138 return $this->{$method}(); 139 case 1: 140 return $this->{$method}($params[0]); 141 case 2: 142 return $this->{$method}($params[0], $params[1]); 143 case 3: -
lithium\action\Controller::__invoke()::{closure} @ 199
/var/www/sites/sportador.japache.net/libraries/lithium/action/Controller.php: 213
208 if (!method_exists($this, $action)) { 209 throw new DispatchException("Action `{$action}` not found."); 210 } 211 $this->_render['template'] = $this->_render['template'] ?: $action; 212 213 if ($result = $this->invokeMethod($action, $args)) { 214 if (is_string($result)) { 215 $this->render(['text' => $result]); 216 return $this->response; 217 } 218 if (is_array($result)) { -
lithium\aop\Filters::run()
/var/www/sites/sportador.japache.net/libraries/lithium/aop/Filters.php: 231
226 */ 227 public static function run($class, $method, array $params, $implementation) { 228 $implementation = static::_bcImplementation($class, $method, $params, $implementation); 229 230 if (!static::hasApplied($class, $method)) { 231 return $implementation($params); 232 } 233 return static::_chain($class, $method)->run($params, $implementation); 234 } 235 236 /** -
lithium\action\Controller::__invoke()
/var/www/sites/sportador.japache.net/libraries/lithium/action/Controller.php: 227
222 223 if (!$this->_render['hasRendered'] && $this->_render['auto']) { 224 $this->render(); 225 } 226 return $this->response; 227 }); 228 } 229 230 /** 231 * This method is used to pass along any data from the controller to the view and layout 232 * -
lithium\action\Dispatcher::lithium\action\{closure}() @ ?
/var/www/sites/sportador.japache.net/libraries/lithium/action/Dispatcher.php: 277
272 */ 273 protected static function _call($callable, $request, $params) { 274 $params = compact('callable', 'request', 'params'); 275 return Filters::run(get_called_class(), __FUNCTION__, $params, function($params) { 276 if (is_callable($callable = $params['callable'])) { 277 return $callable($params['request'], $params['params']); 278 } 279 throw new DispatchException('Result not callable.'); 280 }); 281 } 282} -
lithium\aop\Filters::run()
/var/www/sites/sportador.japache.net/libraries/lithium/aop/Filters.php: 231
226 */ 227 public static function run($class, $method, array $params, $implementation) { 228 $implementation = static::_bcImplementation($class, $method, $params, $implementation); 229 230 if (!static::hasApplied($class, $method)) { 231 return $implementation($params); 232 } 233 return static::_chain($class, $method)->run($params, $implementation); 234 } 235 236 /** -
lithium\action\Dispatcher::_call()
/var/www/sites/sportador.japache.net/libraries/lithium/action/Dispatcher.php: 280
275 return Filters::run(get_called_class(), __FUNCTION__, $params, function($params) { 276 if (is_callable($callable = $params['callable'])) { 277 return $callable($params['request'], $params['params']); 278 } 279 throw new DispatchException('Result not callable.'); 280 }); 281 } 282} 283 284 -
lithium\action\Dispatcher::run()::{closure} @ 154
/var/www/sites/sportador.japache.net/libraries/lithium/action/Dispatcher.php: 169
164 165 if (!$params) { 166 throw new DispatchException('Could not route request.'); 167 } 168 $callable = static::_callable($result, $params, $options); 169 return static::_call($callable, $result, $params); 170 }); 171 } 172 173 /** 174 * Attempts to apply a set of formatting rules from `$_rules` to a `$params` array, where each -
lithium\aop\Chain::__invoke()
/var/www/sites/sportador.japache.net/libraries/lithium/aop/Chain.php: 156
151 if (($filter = next($this->_filters)) !== false) { 152 return $filter($params, $this); 153 } 154 155 $implementation = $this->_implementation; 156 return $implementation($params); 157 } 158 159 /* Deprecated / BC */ 160 161 /** -
/var/www/sites/sportador.japache.net/app/config/bootstrap/action.php::{closure} @ 48
/var/www/sites/sportador.japache.net/app/config/bootstrap/action.php: 50
45 continue; 46 } 47 $file = "{$config['path']}/config/routes.php"; 48 file_exists($file) ? call_user_func(function() use ($file) { include $file; }) : null; 49 } 50 return $next($params); 51 }); 52 /** 53 * This filter protects against HTTP host header attacks, by matching the `Host` header 54 * sent by the client against a known list of good hostnames. You'll need to modify 55 * the list of hostnames inside the filter before using it. -
lithium\aop\Chain::__invoke()
/var/www/sites/sportador.japache.net/libraries/lithium/aop/Chain.php: 152
147 * @return mixed The return value of the next filter. If there is no 148 * next filter, the return value of the implementation. 149 */ 150 public function __invoke(array $params) { 151 if (($filter = next($this->_filters)) !== false) { 152 return $filter($params, $this); 153 } 154 155 $implementation = $this->_implementation; 156 return $implementation($params); 157 } -
lithium\core\ErrorHandler::apply()::{closure} @ 242
/var/www/sites/sportador.japache.net/libraries/lithium/core/ErrorHandler.php: 246
241 242 Filters::apply($class, $method, function($params, $next) use ($conditions, $handler) { 243 $wrap = static::$_exceptionHandler; 244 245 try { 246 return $next($params); 247 } catch (Exception $e) { 248 if (!static::matches($e, $conditions)) { 249 throw $e; 250 } 251 return $handler($wrap($e, true), $params); -
lithium\aop\Chain::run()
/var/www/sites/sportador.japache.net/libraries/lithium/aop/Chain.php: 123
118 */ 119 public function run(array $params, $implementation) { 120 $this->_implementation = $implementation; 121 122 $filter = reset($this->_filters); 123 $result = $filter($params, $this); 124 125 $this->_implementation = null; 126 return $result; 127 } 128 -
lithium\aop\Filters::run()
/var/www/sites/sportador.japache.net/libraries/lithium/aop/Filters.php: 233
228 $implementation = static::_bcImplementation($class, $method, $params, $implementation); 229 230 if (!static::hasApplied($class, $method)) { 231 return $implementation($params); 232 } 233 return static::_chain($class, $method)->run($params, $implementation); 234 } 235 236 /** 237 * Clears filters optionally constrained by class or class and method combination. 238 * -
lithium\action\Dispatcher::run()
/var/www/sites/sportador.japache.net/libraries/lithium/action/Dispatcher.php: 170
165 if (!$params) { 166 throw new DispatchException('Could not route request.'); 167 } 168 $callable = static::_callable($result, $params, $options); 169 return static::_call($callable, $result, $params); 170 }); 171 } 172 173 /** 174 * Attempts to apply a set of formatting rules from `$_rules` to a `$params` array, where each 175 * formatting rule is applied if the key of the rule in `$_rules` is present and not empty in -
[main]
/var/www/sites/sportador.japache.net/app/webroot/index.php: 41
36 * @see lithium\action\Response 37 * @see lithium\action\Dispatcher 38 * @see lithium\net\http\Router 39 * @see lithium\action\Controller 40 */ 41 echo lithium\action\Dispatcher::run(new lithium\action\Request()); 42 43