cvs: pear /Services_Weather Weather.php

From: Date: Mon, 06 Oct 2003 11:07:38 +0000
Subject: cvs: pear /Services_Weather Weather.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13417@lists.php.net to get a copy of this message
eru Mon Oct 6 07:07:38 2003 EDT Modified files: /pear/Services_Weather Weather.php Log: *Moved PEAR require in raiseError Index: pear/Services_Weather/Weather.php diff -u pear/Services_Weather/Weather.php:1.8 pear/Services_Weather/Weather.php:1.9 --- pear/Services_Weather/Weather.php:1.8 Sun Oct 5 13:46:22 2003 +++ pear/Services_Weather/Weather.php Mon Oct 6 07:07:38 2003 @@ -16,9 +16,7 @@ // | Authors: Alexander Wirtz <alex@pc4p.net> | // +----------------------------------------------------------------------+ // -// $Id: Weather.php,v 1.8 2003/10/05 17:46:22 eru Exp $ - -require_once "PEAR.php"; +// $Id: Weather.php,v 1.9 2003/10/06 11:07:38 eru Exp $ // {{{ constants // {{{ cache times @@ -173,6 +171,10 @@ */ function &raiseError($code = SERVICES_WEATHER_ERROR_UNKNOWN_ERROR) { + // This should improve the performance of the script, as PEAR is only included, when + // really needed. + require_once "PEAR.php"; + $message = "Services_Weather: ".Services_Weather::_errorMessage($code); return PEAR::raiseError($message, $code, PEAR_ERROR_RETURN, E_USER_NOTICE, "Services_Weather_Error", null, false);

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