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

Bug #6574 Translation2_Container::raiseError does not honor global PEAR error settings
Submitted: 2006-01-25 01:03 UTC
From: jrossiter at pheedo dot com Assigned: quipo
Status: Closed Package: Translation2
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2006-01-25 01:03 UTC] jrossiter at pheedo dot com
Description: ------------ Translation2 2.0.0b8 Translation2_Container::raiseError does not honor the global PEAR error settings (PEAR_ERROR_RETURN, etc.) because its function definition is as such: function raiseError($msg, $code, $mode=PEAR_ERROR_TRIGGER, $option=E_USER_WARNING) If no mode is specified it defaults to TRIGGER and is not overridable by the developer. Expected result: ---------------- Class should store and honor the global PEAR preference either by properly extending the PEAR class so that setErrorHandling() can be used, or by using $GLOBALS['_PEAR_default_error_mode'] if it's set.

Comments

 [2006-01-26 11:02 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!
 [2006-01-26 18:18 UTC] jrossiter at pheedo dot com
Actually, what might be the best, compatibility speaking, is to keep the definition the way it is, but add if (isset($GLOBALS['_PEAR_default_error_mode'])) { $mode = $GLOBALS['_PEAR_default_error_mode']; } at the top. That way it would work if users didn't have it set, and would continue to use the TRIGGER default, but would accept an override if present.
 [2006-02-11 18:30 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!