Fixed undefined $errors in mass e-mail function
authorDan Fuhry <dan@enanocms.org>
Sat, 15 Dec 2012 12:40:59 -0500
changeset 1374f99b9c5036d4
parent 1373 851b91febb85
child 1376 60b580d22c7b
Fixed undefined $errors in mass e-mail function
plugins/SpecialAdmin.php
     1.1 --- a/plugins/SpecialAdmin.php	Mon Nov 19 11:40:35 2012 -0500
     1.2 +++ b/plugins/SpecialAdmin.php	Sat Dec 15 12:40:59 2012 -0500
     1.3 @@ -1631,6 +1631,9 @@
     1.4  	{
     1.5  		$use_smtp = getConfig('smtp_enabled') == '1';
     1.6  		
     1.7 +		// init errors array
     1.8 +		$errors = array();
     1.9 +		
    1.10  		//
    1.11  		// Let's do some checking to make sure that mass mail functions
    1.12  		// are working in win32 versions of php. (copied from phpBB)
    1.13 @@ -1718,7 +1721,7 @@
    1.14  			}
    1.15  		}
    1.16  		
    1.17 -		if ( sizeof($errors) < 1 )
    1.18 +		if ( empty($errors) )
    1.19  		{
    1.20  		
    1.21  			$mail->from(getConfig('contact_email'));