OSDN Git Service

- fixed bug sending empty mail when template does not exist. (thanks: ryosuke@sekido...
authormumumu-org <mumumu-org@2ef88817-412d-0410-a32c-8029a115e976>
Fri, 19 Sep 2008 16:54:53 +0000 (16:54 +0000)
committermumumu-org <mumumu-org@2ef88817-412d-0410-a32c-8029a115e976>
Fri, 19 Sep 2008 16:54:53 +0000 (16:54 +0000)
CHANGES
class/Ethna_MailSender.php

diff --git a/CHANGES b/CHANGES
index 1e7d80c..4469165 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -36,6 +36,7 @@
 -- [appid]/etc/[appid]-ini.php の memcache_use_connect 設定を memcache_use_pconnect に変更
 - プラグインのクラス名にアンダーバーを許していなかったが、PHPのクラス名的に正当な文字であればOKにするように変更(thanks:maru_cc)
 - Ethna_I18N.php で、メッセージをパースする際に空行を見逃していたバグを修正
+- Ethna_MailSender にてメールを送信する際、テンプレートが存在しなかった場合にも空メールを送ってしまうバグを修正 (thanks: ryosuke@sekido.info -> [ethna-users:1053])
 
 ** 2.5.0-preview1
 
index dda6cb1..58bec6d 100644 (file)
@@ -119,6 +119,9 @@ class Ethna_MailSender
                 $template = $this->def[$template];
             }
             $mail = $renderer->perform(sprintf('%s/%s', $this->mail_dir, $template), true);
+            if (Ethna::isError($mail)) {
+                return $mail;
+            }
         }
         if ($to === null) {
             return $mail;