]> git.mxchange.org Git - friendica.git/blobdiff - src/LegacyModule.php
Merge pull request #6460 from annando/relaying
[friendica.git] / src / LegacyModule.php
index 4b0371edb5f4f73b1664446a52d8f6433587830e..5ef2a0ee612e30a00fb1fc6722736433dbcb9904 100644 (file)
@@ -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}();
                }