Skip to content

Commit 7084b3c

Browse files
committed
updates tweaking a few calls and adding some additional options
1 parent 569b82a commit 7084b3c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Loader.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ public function get_setting($setting)
7171
* @param string $base base path
7272
* @param mixed $methods request methods, string or array including get post put head patch etc..
7373
*/
74-
public function add_route_requirement($type, $function, $source, $path = false, $methods = false)
74+
public function add_route_requirement($type, $function, $source = '', $path = false, $methods = false)
7575
{
7676
if ($path === false)
7777
$path = '/'.$function;
7878
if ($methods === false)
7979
$methods = ['GET', 'POST'];
8080
$this->routes[$path] = [$type, $function, $methods];
81-
$this->add_requirement($function, $source);
81+
if ($source != '')
82+
$this->add_requirement($function, $source);
8283
}
8384

8485
/**

0 commit comments

Comments
 (0)