Skip to content

Commit

Permalink
Callable config option still works
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-betlinski committed May 15, 2019
1 parent a0342b5 commit bdd2927
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Controller/CKFinderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ public function __construct()
{
$authenticationMiddleware = config('ckfinder.authentication');

if(isset($authenticationMiddleware) && is_string($authenticationMiddleware)) {
$this->middleware($authenticationMiddleware);
if(!is_callable($authenticationMiddleware)) {
if(isset($authenticationMiddleware) && is_string($authenticationMiddleware)) {
$this->middleware($authenticationMiddleware);
} else {
$this->middleware(\CKSource\CKFinderBridge\CKFinderMiddleware::class);
}
}
}

Expand Down

0 comments on commit bdd2927

Please sign in to comment.