Exception
lithium\net\http\MediaException
(code 406)
Unhandled media type `ir`.
Source
Stack Trace
-
[exception]
/home/tsit/libraries/lithium/net/http/Media.php: 682
677
678 $result = null;
679 $type = $options['type'];
680
681 if (!isset($handlers[$type])) {
682 throw new MediaException("Unhandled media type `{$type}`.");
683 }
684 $handler = $options + $handlers[$type] + $defaults;
685 $filter = function($v) { return $v !== null; };
686 $handler = array_filter($handler, $filter) + $handlers['default'] + $defaults;
687
-
lithium\aop\Chain::__invoke()
/home/tsit/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 /**
-
/home/tsit/libraries/li3_ts/config/bootstrap/filters.php::{closure} @ 6
/home/tsit/libraries/li3_ts/config/bootstrap/filters.php: 8
3 use lithium\net\http\Media;
4
5 use li3_ts\util\Set;
6 Filters::apply(Media::class, 'render', function($params, $next){
7 if(empty($params['options']['download'])) {
8 return $next($params);
9 }
10
11 $downloadParams = $params['options']['download'];
12 $filePath = $downloadParams['file_path'];
13 $path = explode('.', $filePath);
-
lithium\aop\Chain::run()
/home/tsit/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()
/home/tsit/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\net\http\Media::render()
/home/tsit/libraries/lithium/net/http/Media.php: 698
693 $response->headers('Content-Type', $header);
694 }
695 $response->body(static::_handle($handler, $data, $response));
696
697 return $response;
698 });
699 }
700
701 /**
702 * Configures a template object instance, based on a media handler configuration.
703 *
-
lithium\action\Controller::render()
/home/tsit/libraries/lithium/action/Controller.php: 295
290
291 if ($options['head']) {
292 return;
293 }
294 $response = $media::render($this->response, $this->_render['data'], $options + [
295 'request' => $this->request
296 ]);
297 return ($this->response = $response ?: $this->response);
298 }
299
300 /**
-
lithium\action\Controller::__invoke()::{closure} @ 199
/home/tsit/libraries/lithium/action/Controller.php: 224
219 $this->set($result);
220 }
221 }
222
223 if (!$this->_render['hasRendered'] && $this->_render['auto']) {
224 $this->render();
225 }
226 return $this->response;
227 });
228 }
229
-
lithium\aop\Filters::run()
/home/tsit/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()
/home/tsit/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}() @ ?
/home/tsit/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\Chain::__invoke()
/home/tsit/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 /**
-
/home/tsit/app/config/bootstrap/action.php::{closure} @ 34
/home/tsit/app/config/bootstrap/action.php: 49
44 if (!$callable->user) {
45 if (empty($callable->whitelist) || !in_array($action, $callable->whitelist)) {
46 return new Response(['location' => Router::match('auth::signin')]);
47 }
48
49 return $next($params);
50 } else {
51 $result = SessionUser::find('first', [
52 'conditions' => [
53 'session_id' =>session_id()
54 ],
-
lithium\aop\Chain::run()
/home/tsit/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()
/home/tsit/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::_call()
/home/tsit/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
/home/tsit/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()
/home/tsit/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 /**
-
/home/tsit/app/config/bootstrap/g11n.php::{closure} @ 41
/home/tsit/app/config/bootstrap/g11n.php: 54
49 }
50 Environment::set(true, compact('locale'));
51
52 date_default_timezone_set($locales[$locale]['timezone']);
53
54 return $next($params);
55 });
56
57 Catalog::config(array(
58 'runtime' => array(
59 'adapter' => 'Memory'
-
lithium\aop\Chain::__invoke()
/home/tsit/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 }
-
/home/tsit/app/config/bootstrap/action.php::{closure} @ 28
/home/tsit/app/config/bootstrap/action.php: 31
26 Environment::set(true, ['panel' => $config['panel']]);
27 }
28 file_exists($file) ? call_user_func(function () use ($file) {include $file;}) : null;
29 }
30
31 return $next($params);
32 });
33
34 Filters::apply(Dispatcher::class, '_call', function($params, $next){
35 if($params['request']->params['library'] =='admin') {
36 return $next($params);
-
lithium\aop\Chain::__invoke()
/home/tsit/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
/home/tsit/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::__invoke()
/home/tsit/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 }
-
/home/tsit/app/config/bootstrap/cache.php::{closure} @ 30
/home/tsit/app/config/bootstrap/cache.php: 38
33
34 if ($cache = Cache::read('default', $key)) {
35 $cache = (array) $cache + Libraries::cache();
36 Libraries::cache($cache);
37 }
38 $result = $next($params);
39
40 if ($cache !== Libraries::cache()) {
41 Cache::write('default', $key, Libraries::cache(), '+1 day');
42 }
43
-
lithium\aop\Chain::__invoke()
/home/tsit/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
/home/tsit/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()
/home/tsit/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()
/home/tsit/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()
/home/tsit/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]
/home/tsit/app/webroot/index.php: 10
5 * @copyright Copyright 2013, Union of RAD (http://union-of-rad.org)
6 * @license http://opensource.org/licenses/bsd-license.php The BSD License
7 */
8 ini_set('memory_limit', '-1');
9 require dirname(__DIR__) . '/config/bootstrap.php';
10 echo lithium\action\Dispatcher::run(new app\extensions\action\Request());
11
12