X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp%2FRouter.php;h=c18c048eaa8db0ac3a32a94f7d2a56c8534d2587;hb=c650285a94552858b8ef3ebadb7854cdbadeca7d;hp=d27a9c1ae98cdb49dd03527396d10c368368ee37;hpb=df23690a93ded5991758f01744d38f70aa45f8d3;p=friendica.git diff --git a/src/App/Router.php b/src/App/Router.php index d27a9c1ae9..c18c048eaa 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -1,6 +1,6 @@ routeCollector = isset($routeCollector) ? $routeCollector : new RouteCollector(new Std(), new GroupCountBased()); + + if ($this->baseRoutesFilepath && !file_exists($this->baseRoutesFilepath)) { + throw new HTTPException\InternalServerErrorException('Routes file path does\'n exist.'); + } } /** @@ -249,7 +259,7 @@ class Router { $dispatchData = []; - if ($this->baseRoutesFilepath && file_exists($this->baseRoutesFilepath)) { + if ($this->baseRoutesFilepath) { $dispatchData = require $this->baseRoutesFilepath; if (!is_array($dispatchData)) { throw new HTTPException\InternalServerErrorException('Invalid base routes file'); @@ -280,7 +290,7 @@ class Router $lastRoutesFileModifiedTime = $this->cache->get('lastRoutesFileModifiedTime'); $forceRecompute = false; - if ($this->baseRoutesFilepath && file_exists($this->baseRoutesFilepath)) { + if ($this->baseRoutesFilepath) { $routesFileModifiedTime = filemtime($this->baseRoutesFilepath); $forceRecompute = $lastRoutesFileModifiedTime != $routesFileModifiedTime; }