Easy Swift overlook

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Easy Swift overlook

Post by John Cartwright »

Was just checking out the source code quickly, and noticed in EasySwift.php

Code: Select all

public function setError($msg)
	{
		$this->errors[] = $msg;
		$this->lastError = $msg;
	}
	/**
	 * Get the last error that occured
	 * @return string
	 */
	public function getLastError()
	{
		if (count($this->errors)) return $this->errors[count($this->errors)-1];
	}
You are setting $lasterror but nothing using it in getLastError()
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Good point :) Cheers. I set lastError purely for backwards compatibility with version 2. I'll update that code in the trunk, thanks :)
Post Reply