PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » LiveUser » Bug #567

LiveUser::init useless code present

Details

Submitted2004-01-13 19:13 UTC
Fromjmikola at burgiss dot com
Assignedlsmith
StatusClosed
PackageLiveUser
PHP VersionIrrelevant
OSANY
Roadmaps(Not assigned)

Comments

[2004-01-13 19:13 UTC] jmikola at burgiss dot com

Description:
------------
towards the end of the function:

if (is_object($this->_auth)) {
return true;
} elseif (empty($this->_auth->handle)) {
return false;
} else {
$this->_error = true;
return PEAR::raiseError(null, LIVEUSER_AUTH_NOTFOUND, null, E_USER_WARNING,
"Auth object not found in LiveUser::init()", 'LiveUser', true);
}

now, assuming the first condition fails, and $_auth is not an object, what chance is there that the handle variable within the hypothetical $_auth object is anything but empty? i can't think of a case where the last else pertaining to error-raising would ever be executed.