cvs: pear /MDB/MDB/Modules/Manager pgsql.php

From: Date: Sat, 01 Feb 2003 17:37:04 +0000
Subject: cvs: pear /MDB/MDB/Modules/Manager pgsql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-8642@lists.php.net to get a copy of this message
lsmith Sat Feb 1 12:37:04 2003 EDT Modified files: /pear/MDB/MDB/Modules/Manager pgsql.php Log: fixed incorrect error handling Index: pear/MDB/MDB/Modules/Manager/pgsql.php diff -u pear/MDB/MDB/Modules/Manager/pgsql.php:1.33 pear/MDB/MDB/Modules/Manager/pgsql.php:1.34 --- pear/MDB/MDB/Modules/Manager/pgsql.php:1.33 Sun Jan 19 06:12:44 2003 +++ pear/MDB/MDB/Modules/Manager/pgsql.php Sat Feb 1 12:37:04 2003 @@ -42,7 +42,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.33 2003/01/19 11:12:44 lsmith Exp $ +// $Id: pgsql.php,v 1.34 2003/02/01 17:37:04 lsmith Exp $ if(!defined('MDB_MANAGER_PGSQL_INCLUDED')) { @@ -263,16 +263,16 @@ if (isSet($changes['AddedFields'])) { $fields = $changes['AddedFields']; for ($field = 0, reset($fields); $field < count($fields); next($fields), $field++) { - if (!$db->query("ALTER TABLE $name ADD ".$fields[key($fields)]['Declaration'])) { - $db->pgsqlError(); + if (MDB::isError($result = $db->query("ALTER TABLE $name ADD ".$fields[key($fields)]['Declaration']))) { + return($result); } } } if (isSet($changes['RemovedFields'])) { $fields = $changes['RemovedFields']; for ($field = 0, reset($fields); $field < count($fields); next($fields), $field++) { - if (!$db->query("ALTER TABLE $name DROP ".key($fields))) { - $db->pgsqlError(); + if (MDB::isError($result = $db->query("ALTER TABLE $name DROP ".key($fields)))) { + return($result); } } }

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