cvs: pear-core /PEAR Command.php

From: Date: Fri, 26 Nov 2004 19:46:55 +0000
Subject: cvs: pear-core /PEAR Command.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-26533@lists.php.net to get a copy of this message
cellog Fri Nov 26 14:46:55 2004 EDT Modified files: /pear-core/PEAR Command.php Log: make getFrontendObject() use setFrontendClass() http://cvs.php.net/diff.php/pear-core/PEAR/Command.php?r1=1.26&r2=1.27&ty=u Index: pear-core/PEAR/Command.php diff -u pear-core/PEAR/Command.php:1.26 pear-core/PEAR/Command.php:1.27 --- pear-core/PEAR/Command.php:1.26 Fri Nov 26 14:33:53 2004 +++ pear-core/PEAR/Command.php Fri Nov 26 14:46:55 2004 @@ -16,7 +16,7 @@ // | Author: Stig Bakken <ssb@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Command.php,v 1.26 2004/11/26 19:33:53 cellog Exp $ +// $Id: Command.php,v 1.27 2004/11/26 19:46:55 cellog Exp $ require_once "PEAR.php"; @@ -135,13 +135,16 @@ /** * Get instance of frontend object. * - * @return object + * @return object|PEAR_Error * @static */ function &getFrontendObject() { if (empty($GLOBALS['_PEAR_Command_uiobject'])) { - $GLOBALS['_PEAR_Command_uiobject'] = &new $GLOBALS['_PEAR_Command_uiclass']; + $e = PEAR_Command::setFrontendClass($GLOBALS['_PEAR_Command_uiclass']); + if (PEAR::isError($e)) { + return $e; + } } return $GLOBALS['_PEAR_Command_uiobject']; }

« previous php.pear.cvs (#26533) next »