diff --git a/plugins/rest/lib/rest.php b/plugins/rest/lib/rest.php index 19e414ea..f82d8810 100644 --- a/plugins/rest/lib/rest.php +++ b/plugins/rest/lib/rest.php @@ -41,7 +41,7 @@ public static function getRoutes() public static function getCurrentPath() { $url = parse_url($_SERVER['REQUEST_URI']); - if (isset($url['path']) && class_exists('\rex_yrewrite')) { + if (isset($url['path']) && class_exists('\rex_yrewrite') && rex_yrewrite::getCurrentDomain()) { $currentPath = str_replace(rex_yrewrite::getCurrentDomain()->getPath(), '/', $url['path']); } else { $currentPath = '';