cvs: php4 /pear/DB pgsql.php
| From: | Thomas V.V.Cox | Date: | Sun, 22 Jul 2001 16:09:53 +0000 |
| Subject: | cvs: php4 /pear/DB pgsql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-326@lists.php.net to get a copy of this message | ||
cox Sun Jul 22 12:09:53 2001 EDT
Modified files:
/php4/pear/DB pgsql.php
Log:
handle error handlers properly in nextId()
Index: php4/pear/DB/pgsql.php
diff -u php4/pear/DB/pgsql.php:1.40 php4/pear/DB/pgsql.php:1.41
--- php4/pear/DB/pgsql.php:1.40 Sat Jul 14 15:56:17 2001
+++ php4/pear/DB/pgsql.php Sun Jul 22 12:09:53 2001
@@ -472,7 +472,11 @@
$sqn = preg_replace('/[^a-z0-9_]/i', '_', $seq_name);
$repeat = 0;
do {
+ // XXX HACK: temporarily force error mode to "return"
+ $tmp = $this->_default_error_mode;
+ $this->_default_error_mode = PEAR_ERROR_RETURN;
$result = $this->query("SELECT NEXTVAL('${sqn}_seq')");
+ $this->_default_error_mode = $tmp;
if ($ondemand && DB::isError($result) &&
$result->getCode() == DB_ERROR_NOSUCHTABLE) {
$repeat = 1;