Procházet zdrojové kódy

Fix Call to undefined method Twig\Template::findTemplateFilePath()

Because Twig also uses the "Template" class name
Julio Montoya před 6 roky
rodič
revize
5eb426eac6
2 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 5 0
      main/inc/lib/api.lib.php
  2. 1 1
      main/inc/lib/template.lib.php

+ 5 - 0
main/inc/lib/api.lib.php

@@ -9426,3 +9426,8 @@ function api_set_noreply_and_from_address_to_mailer(PHPMailer $mailer, array $se
 
 
     $mailer->SetFrom($senderEmail, $senderName, !$avoidReplyToAddress);
     $mailer->SetFrom($senderEmail, $senderName, !$avoidReplyToAddress);
 }
 }
+
+function api_find_template($template)
+{
+    return Template::findTemplateFilePath($template);
+}

+ 1 - 1
main/inc/lib/template.lib.php

@@ -175,7 +175,7 @@ class Template
             ],
             ],
             [
             [
                 'name' => 'get_template',
                 'name' => 'get_template',
-                'callable' => 'Template::findTemplateFilePath',
+                'callable' => 'api_find_template',
             ],
             ],
             [
             [
                 'name' => 'date_to_time_ago',
                 'name' => 'date_to_time_ago',