mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 05:58:42 +00:00
Potential route import bug fix
This commit is contained in:
parent
d915ea7329
commit
c2e613ac95
|
|
@ -54,15 +54,21 @@ class Router
|
||||||
*
|
*
|
||||||
* @param string $path Route file path
|
* @param string $path Route file path
|
||||||
*
|
*
|
||||||
* @return void
|
* @return bool
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function importFromFile(string $path)
|
public function importFromFile(string $path) : bool
|
||||||
{
|
{
|
||||||
/** @noinspection PhpIncludeInspection */
|
if(file_exists($path)) {
|
||||||
$this->routes += include $path;
|
/** @noinspection PhpIncludeInspection */
|
||||||
|
$this->routes += include $path;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user