Some reminiscences, some memories

Just another boring day
« Zend_Mail 中文主题编码后超过74个字节,主题乱码的 Bug
Travian用 js 插件 »

31

Jan

Zend_Mail 发送邮件后提示 Fatal Error

mikespook 

这实际上是由于 PHP 不允许在析构函数中抛出异常造成的,关于这个 issue 我已经提交到 issues 上:

http://framework.zend.com/issues/browse/ZF-2534

暂时没有想到好的解决方法。通常执行到析构函数时,邮件已经正确发出。所以最不济的方法就是用try…catch… 捕获异常,并忽略掉。

如下:

public function __destruct()
{

     try

    {
         if ($this->_connection instanceof Zend_Mail_Protocol_Smtp)

        {

            $this->_connection->quit();

            $this->_connection->disconnect();

         }

    catch(Zend_Exception $e)

    {

    }
}

This entry was posted on Thursday, January 31st, 2008 at 09:09 and is filed under Zend Framework. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Trackback URI | Comments RSS

 

September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930  

Recent Comments

  • cbf107 on 我们精通精通
  • mikespook on 我们精通精通
  • == on 我们精通精通
  • 老熊 on 关于Web编程异步模型的白日梦
  • Some reminiscences, some memories » Blog Archive » Akihabara 指南目录 on Akihabara 指南

Tags

乱码 协程 地震 备案 安装 广州 异步 性能 我爱发明 扯淡 招聘 游戏 漏洞 翻译 豆瓣 39.com Adobe akihabara config countdown Demo Flash game engine golang google html5 issue linux Micromedia MongoDB mysql NetBeans nginx NoSQL oracle PHP phpunit Python trac ubuntu xdebug xml xubuntu yield Zend Framework

Blogroll

  • Blog on 27th Floor
  • DBA notes
  • Tim[后端技术]
  • 唐海燕
  • 小众音乐
  • 抚琴居
  • 某人的栖息地
  • 番茄’s Blog
  • 網站製作學習誌
  • 纸老虎传媒

Old friends

  • cbf107

Only

  • 媚惑桃花

OurPNP

  • Biaoest:标的最高级
  • flexsns-官方博客
  • PNP University
  • PNP街坊
  • smallfish 鱼哥的窝子
  • 冰山日志
  • 墙外的光神V5
  • 夜雨's Blog
  • 小冬kobe
  • 小路的奇异世界
  • 广州萌芽工作室
  • 老甘blog
  • 赖勇浩的编程私伙局

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Powered by WordPress
mikespook.com 粤ICP备09065095号