cvs: pear /MDB2_Schema/MDB2 Schema.php

From: Date: Fri, 15 Apr 2005 08:33:15 +0000
Subject: cvs: pear /MDB2_Schema/MDB2 Schema.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-31181@lists.php.net to get a copy of this message
lsmith Fri Apr 15 04:33:15 2005 EDT Modified files: /pear/MDB2_Schema/MDB2 Schema.php Log: - fixed error hanling in updateDatabase() http://cvs.php.net/diff.php/pear/MDB2_Schema/MDB2/Schema.php?r1=1.4&r2=1.5&ty=u Index: pear/MDB2_Schema/MDB2/Schema.php diff -u pear/MDB2_Schema/MDB2/Schema.php:1.4 pear/MDB2_Schema/MDB2/Schema.php:1.5 --- pear/MDB2_Schema/MDB2/Schema.php:1.4 Thu Apr 7 04:23:59 2005 +++ pear/MDB2_Schema/MDB2/Schema.php Fri Apr 15 04:33:14 2005 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: Schema.php,v 1.4 2005/04/07 08:23:59 lsmith Exp $ +// $Id: Schema.php,v 1.5 2005/04/15 08:33:14 lsmith Exp $ // require_once 'MDB2.php'; @@ -1781,11 +1781,12 @@ $this->db->expectError($errorcodes); $databases = $this->db->manager->listDatabases(); $this->db->popExpect(); - if (!MDB2::isError($databases, $errorcodes)) { - return $databases; - } - if (!PEAR::isError($databases) - && (!is_array($databases) || !in_array($this->database_definition['name'], $databases)) + if (PEAR::isError($databases)) { + if (!MDB2::isError($databases, $errorcodes)) { + return $databases; + } + } elseif (!is_array($databases) || + !in_array($this->database_definition['name'], $databases) ) { return $this->raiseError(MDB2_ERROR, null, null, 'database to update does not exist: '.$this->database_definition['name']);

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