Explorar o código

fix getServerPath - was including true in output

CauseFX %!s(int64=5) %!d(string=hai) anos
pai
achega
3211b60c9f
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      api/functions/normal-functions.php

+ 2 - 1
api/functions/normal-functions.php

@@ -477,7 +477,8 @@ trait NormalFunctions
 				$domain = $_SERVER['HTTP_HOST'];
 			}
 		}
-		$path = (str_replace("\\", "/", dirname($_SERVER['REQUEST_URI'])) !== '.') ?? '';
+		$path = str_replace("\\", "/", dirname($_SERVER['REQUEST_URI']));
+		$path = ($path !== '.') ? $path : '';
 		$url = $protocol . $domain . $path;
 		if (strpos($url, '/api') !== false) {
 			$url = explode('/api', $url);