X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FLegacyModule.php;h=5ef2a0ee612e30a00fb1fc6722736433dbcb9904;hb=4894e89f036be1f8a82523ac69d56ae36e7685df;hp=4b0371edb5f4f73b1664446a52d8f6433587830e;hpb=5326cc0c2edab855271aafb44133e4843903cfe0;p=friendica.git diff --git a/src/LegacyModule.php b/src/LegacyModule.php index 4b0371edb5..5ef2a0ee61 100644 --- a/src/LegacyModule.php +++ b/src/LegacyModule.php @@ -25,7 +25,7 @@ class LegacyModule extends BaseModule */ public static function setModuleFile($file_path) { - if (!file_exists($file_path)) { + if (!is_readable($file_path)) { throw new Exception(Core\L10n::t('Legacy module file not found: %s', $file_path)); } @@ -65,7 +65,8 @@ class LegacyModule extends BaseModule $function_name = static::$moduleName . '_' . $function_suffix; if (\function_exists($function_name)) { - return $function_name(self::getApp()); + $a = self::getApp(); + return $function_name($a); } else { return parent::{$function_suffix}(); }