#23932 [NEW]: PEAR_Frontend_CLI::displayError shouldn't dereference $eobj

From: Date: Sat, 31 May 2003 23:18:20 +0000
Subject: #23932 [NEW]: PEAR_Frontend_CLI::displayError shouldn't dereference $eobj
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16864@lists.php.net to get a copy of this message
From: greg at chiaraquartet dot net Operating system: Windows XP PHP version: 4.3.2 PHP Bug Type: PEAR related Bug description: PEAR_Frontend_CLI::displayError shouldn't dereference $eobj it would be helpful to know for sure whether PEAR_Frontend_CLI::displayError() accepts both strings and objects (a little @param string|object in a docblock would be helpful here). In any case, if you do pear info blah there is a call to a non-object because the source which is: function displayError($eobj) { return $this->_displayLine($eobj->getMessage()); } should be: /** * @param string Error Message */ function displayError($eobj) { return $this->_displayLine($eobj); } or: /** * @param object|string either an error message * or a class with a getMessage() method */ function displayError($eobj) { if (is_object($eobj) { return $this->_displayLine($eobj->getMessage()); } else { return $this->_displayLine($eobj); } } } -- Edit bug report at http://bugs.php.net/?id=23932&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23932&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23932&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23932&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23932&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23932&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23932&r=support Expected behavior: http://bugs.php.net/fix.php?id=23932&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23932&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23932&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23932&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23932&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23932&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23932&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23932&r=gnused

« previous php.pear.dev (#16864) next »