macagua / example-yii-mail

Automatically exported from code.google.com/p/yii-mail
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Sending emails in CConsoleApplication results in PHP error #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With strict errors turned on I had to tweak the code in YiiMailMessage.php

At line 134 I have changed the code to:

// if Yii::app()->controller doesn't exist create a dummy 
            // controller to render the view (needed in the console app)
            if(isset(Yii::app()->controller))
            {
                $controller = Yii::app()->controller;
            } else
            {
                $controller = new CController('YiiMail');
            }

Original issue reported on code.google.com by lxm...@googlemail.com on 23 Nov 2010 at 11:34

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r7.

Original comment by poppity...@gmail.com on 15 Jan 2011 at 10:38