Skip to content
Permalink
Browse files

Move default into class so simpler ::class syntax can be used.

  • Loading branch information...
dereuromark committed Nov 27, 2016
1 parent 0f77dc0 commit 40b39d1c77809f8397067896b38e0495fa728699
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/Error/Middleware/ErrorHandlerMiddleware.php
@@ -55,12 +55,17 @@ class ErrorHandlerMiddleware
* Constructor
*
* @param string|callable|null $renderer The renderer or class name
* to use or a callable factory.
* to use or a callable factory. If null, Configure::read('Error.exceptionRenderer')
* will be used.
* @param array $config Configuration options to use. If empty, `Configure::read('Error')`
* will be used.
*/
public function __construct($renderer = null, array $config = [])
{
if ($renderer === null) {
$renderer = Configure::read('Error.exceptionRenderer');
}
$this->renderer = $renderer ?: 'Cake\Error\ExceptionRenderer';
$config = $config ?: Configure::read('Error');
$this->config($config);

0 comments on commit 40b39d1

Please sign in to comment.
You can’t perform that action at this time.