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

Request #10145 Patch to return a Pear Error Object on failure
Submitted: 2007-02-21 10:22 UTC Modified: 2010-08-12 17:57 UTC
From: lucor Assigned: mrook
Status: Closed Package: Archive_Tar (version 1.3.2)
PHP Version: Irrelevant OS:
Roadmaps: 1.3.8    
Subscription  


 [2007-02-21 10:22 UTC] lucor (Luca Corbo)
Description: ------------ This patch allows to return a Pear Error Object on failure Test script: --------------- --- Tar.php.orig 2007-02-21 15:23:10.000000000 +0100 +++ Tar.php 2007-02-21 15:22:23.000000000 +0100 @@ -62,6 +62,11 @@ * @var string Local Tar name of a remote Tar (http:// or ftp://) */ var $_temp_tarname=''; + + /** + * @var object PEAR_Error object + */ + var $error_object=NULL; // {{{ constructor /** @@ -569,11 +574,14 @@ // {{{ _error() function _error($p_message) { - // ----- To be completed - $this->raiseError($p_message); + if (isset($this) && is_a($this, 'PEAR')) { + $this->error_object = &$this->raiseError($p_message, null, null, null, null); + } else { + $this->error_object = &PEAR::raiseError($p_message, null, null, null, null); + } } // }}} - + // {{{ _warning() function _warning($p_message) {

Comments

 [2010-08-12 17:57 UTC] mrook (Michiel Rook)
-Status: Open +Status: Closed -Assigned To: +Assigned To: mrook -Roadmap Versions: +Roadmap Versions: 1.3.8
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.