cvs: pear /DB DB.php /DB/DB common.php

From: Date: Sun, 26 May 2002 16:14:15 +0000
Subject: cvs: pear /DB DB.php /DB/DB common.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4104@lists.php.net to get a copy of this message
cox Sun May 26 12:14:15 2002 EDT Modified files: /pear/DB DB.php /pear/DB/DB common.php Log: Drop isWarning() Minor other clean-ups Index: pear/DB/DB.php diff -u pear/DB/DB.php:1.8 pear/DB/DB.php:1.9 --- pear/DB/DB.php:1.8 Sun May 26 11:59:18 2002 +++ pear/DB/DB.php Sun May 26 12:14:14 2002 @@ -17,7 +17,7 @@ // | Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.8 2002/05/26 15:59:18 cox Exp $ +// $Id: DB.php,v 1.9 2002/05/26 16:14:14 cox Exp $ // // Database independent query interface. // @@ -65,6 +65,8 @@ * Warnings are not detected as errors by DB::isError(), and are not * fatal. You can detect whether an error is in fact a warning with * DB::isWarning(). + * + * @deprecated */ define('DB_WARNING', -1000); @@ -345,24 +347,6 @@ } /** - * Tell whether a result code from a DB method is a warning. - * Warnings differ from errors in that they are generated by DB, - * and are not fatal. - * - * @param mixed result value - * - * @return boolean whether $value is a warning - * - * @access public - */ - function isWarning($value) - { - return (is_object($value) && - (get_class($value) == "db_warning" || - is_subclass_of($value, "db_warning"))); - } - - /** * Return a textual error message for a DB error code * * @param integer $value error code @@ -804,7 +788,7 @@ /** * Frees the resources allocated for this result set. - * @return int error code + * @return int error code * * @access public */ Index: pear/DB/DB/common.php diff -u pear/DB/DB/common.php:1.3 pear/DB/DB/common.php:1.4 --- pear/DB/DB/common.php:1.3 Thu May 9 08:29:53 2002 +++ pear/DB/DB/common.php Sun May 26 12:14:15 2002 @@ -16,7 +16,7 @@ // | Author: Stig Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: common.php,v 1.3 2002/05/09 12:29:53 ssb Exp $ +// $Id: common.php,v 1.4 2002/05/26 16:14:15 cox Exp $ // // Base class for DB implementations. // @@ -213,10 +213,7 @@ if (isset($this->errorcode_map[$nativecode])) { return $this->errorcode_map[$nativecode]; } - - //php_error(E_WARNING, get_class($this)."::errorCode: no mapping for $nativecode"); // Fall back to DB_ERROR if there was no mapping. - return DB_ERROR; }

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