Page 1 of 1

Easy Swift overlook

Posted: Thu Dec 28, 2006 5:17 pm
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()

Posted: Thu Dec 28, 2006 5:43 pm
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 :)