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

Bug #1710 _raiseError() doesn not return a PEAR_Error Object
Submitted: 2004-06-23 22:21 UTC
From: alejandro at todomexico dot com Assigned: damian
Status: Closed Package: Net_Cyrus
PHP Version: 4.2.0 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 29 - 13 = ?

 
 [2004-06-23 22:21 UTC] alejandro at todomexico dot com
Description: ------------ Function _raiseError() should return a PEAR_Error object, it doesn't, so, functions that depend on this function does not report errors. function _raiseError($msg, $code) { include_once 'PEAR.php'; PEAR::raiseError($msg, $code); } Reproduce code: --------------- Example: I want to catch some errors... $ret = $cyrus->renameUser('UserThatDontExist', 'UserThatExist'); if(PEAR::isError($ret)) { echo $ret->getMessage() } Due the fact that _raiseError() does´t return an error, the error does not propagate to this function. Expected result: ---------------- A PEAR_Error object when an error ocurrs. This fixed the problem for me. function _raiseError($msg, $code) { include_once 'PEAR.php'; return PEAR::raiseError($msg, $code); } Actual result: -------------- Nothing is returned when an error occurs.

Comments

 [2004-06-26 16:06 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!