Explorar el Código

fix getServerPath - was including true in output

CauseFX hace 5 años
padre
commit
3211b60c9f
Se han modificado 1 ficheros con 2 adiciones y 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);