Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
titrxw committed Nov 27, 2020
1 parent 918c30f commit a85d237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Core/Route/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private function isStaticResource($resource) {
$documentRoot = $this->config['document_root'] ?? '';
$enableStatic = $this->config['enable_static_handler'] ?? false;
if ($enableStatic && $documentRoot) {
$module = $this->getModule() === $this->defaultModule ? '' : '/' . $this->getModule();
$module = $this->getModule() === $this->defaultModule ? '' : ('/' . $this->getModule());
$path = $documentRoot . $module . '/' . ltrim($resource, '/');
return file_exists($path);
}
Expand Down

0 comments on commit a85d237

Please sign in to comment.