Skip to content

Commit

Permalink
Static route is broken
Browse files Browse the repository at this point in the history
path separator being used instead of the directory separator
  • Loading branch information
CrisHigham committed Sep 8, 2023
1 parent e77cddc commit 845c651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tina4/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ final public function resolveRoute(?string $method, ?string $url, ?Config $confi

//SECOND STATIC FILES - ONLY GET
if ($method === TINA4_GET) {
$fileName = realpath(TINA4_DOCUMENT_ROOT . PATH_SEPARATOR."src".PATH_SEPARATOR."public".$url); //The most obvious request
$fileName = realpath(TINA4_DOCUMENT_ROOT . DIRECTORY_SEPARATOR . "src" . DIRECTORY_SEPARATOR . "public" . $url); //The most obvious request
if (file_exists($fileName) && $routerResponse = $this->returnStatic($fileName)) {
Debug::message("$this->GUID GET - " . $fileName, TINA4_LOG_DEBUG);
if (defined("TINA4_CACHED_ROUTES") && strpos(print_r(TINA4_CACHED_ROUTES, 1), $url) !== false) {
Expand Down

0 comments on commit 845c651

Please sign in to comment.