Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.0

Bug #5690 unnessecary exception thrown
Submitted: 2005-10-14 10:59 UTC
From: jeroen at terena dot nl Assigned: lsmith
Status: Closed Package: LiveUser_Admin
PHP Version: 5.0.5 OS: debian
Roadmaps: (Not assigned)    
Subscription  


 [2005-10-14 10:59 UTC] jeroen at terena dot nl
Description: ------------ inside LiverUser/Admin.php the function _getUsersByPerm() throws an exception when no users were found. Test script: --------------- $filters = array(); $filters['auth_user_id'] = 'somecrazyemailthatdontexisst@example.com'; $user = $lu_admin->getUsers('perm', $filters, true); IMHO you don't need an error/esception here as no results are not an error, just expected behaviour. I'd simple cut out the error raising bit: $permUsers = $this->perm->getUsers($permFilter); if (!$permUsers) { return false; } Expected result: ---------------- just $user set to false, or perhaps an empty array. Actual result: -------------- $user = false AND an exception/Pear_Errorstack is thrown with code LIVEUSER_ADMIN_ERROR This isn't a very specific error which makes it even harder to anticipate.

Comments

 [2005-10-14 23:18 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!