From 5f6adc922192d0905c9d694d5953eb1a56373315 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 9 Jul 2021 07:42:28 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#1404 --- wire/modules/LanguageSupport/LanguageTranslator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wire/modules/LanguageSupport/LanguageTranslator.php b/wire/modules/LanguageSupport/LanguageTranslator.php index 0e64cf74..75f6c6a2 100644 --- a/wire/modules/LanguageSupport/LanguageTranslator.php +++ b/wire/modules/LanguageSupport/LanguageTranslator.php @@ -178,7 +178,8 @@ class LanguageTranslator extends Wire { // not a core module $config = $this->wire()->config; $filename = $this->wire()->files->unixFileName($filename); - if(strpos($filename, $config->urls($o)) === false && strpos($filename, "/$class/") !== false) { + $url = $config->urls($o); + if($url && strpos($filename, $url) === false && strpos($filename, "/$class/") !== false) { // module likely in a symbolic link directory, so determine our own path for textdomain // rather than using the one provided by ReflectionClass list(, $filename) = explode("/$class/", $filename, 2);