From nobody Mon Nov 27 12:21:50 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sf4TB5XdGz5329Q; Mon, 27 Nov 2023 12:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sf4TB5JNrz4Q35; Mon, 27 Nov 2023 12:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701087710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lwV0IVXzU+aGsdHnvR/zI5Zx8iNBFRsTmyAISdfObjM=; b=Blc3BNVyON+vYut+AS5H0SQpBcx4UCu43Elleg4wfx4PuX2ObIb+vfuKq6G1iG7PFqhcIq 2uIH8GO5RIAAizp1VbfssyI/4/8z13N5m1k4WnAzRwyTseu/jyVrqlGpsbt0+rvhOzn5Go +E7GJYt8dKxxiAiTtOZ026b45Lk6UrL1tjIlZbIZlapS7CLUYRE89C7r0HX1d+hyuWwSmc XDjlVyKelyqqYYVi86Poulc1JWzbzMVlM/cjdXoIYOdycWpw9gKKPCA8irko7krSuF6Qaf M6CaASXDNaRpQmzGIx4wrscXNDRt2hMDXfcaieqhLs/aPyeuWdjvs/uLFfu7/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701087710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lwV0IVXzU+aGsdHnvR/zI5Zx8iNBFRsTmyAISdfObjM=; b=URlqmJUg7xfDennnf8vfsE2sgo6v1vx5B3qU5zQRd7iDK0tjBSmNto8i8l02kcUlIkfPSX g9EbTStJqkzZT6reuCXB1LuyDVHriE+WyxPZvctFViROdoaL9l2N/LZQkYlmuVNcsPP37f oyEFSFXsb1Sg2tETsUsJn4DnPsJX81d3GpVKmf1oSmxeT9BAt1ym15PeFsfZsX45NqfWc3 TWuHL6usC2xSYPO1kwq1a2cLV8rMSfSMuYckGsgdxzZMQ5vMLeCLP1C3XWxT4pW1ky7fj+ n3B8PLmPdzOGVL/WDLi83S4ipagPQrjEA2Wgr0LH1yS95XVfPAYIS5BqBIV1Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701087710; a=rsa-sha256; cv=none; b=lSub6T0CgoP+4OiqVcIDsMsXc0IXm+zaKsm61A6ZUn3tLhuotFUPDkwlo0hBjjy57xC7h7 fcxyUZiwU4CNuJpPhki1KWuoTtZxbuO1tZczlESSFsNS1nqGzxsakSLz63CAkt8VuXomNF 3f4GRKq8WXRB6uYXvqwXYPJaGPUoGLhPt+2cRmk6YXo9Sg5TrUwzDS262fZh8QG0z0kv4w 01UbDVolP8QKJK0YAcuKzIMpGFs443DKOTk2XuZxKT+uo5Bt32ZJqR00W6VXmQTsF1WMav tNcuHIMqTgFJORP1AlACpMV8/sAVYR9FUplN767dAr3uLbCFbaMWD3ioNlNMUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sf4TB4Ghdzdt9; Mon, 27 Nov 2023 12:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ARCLoiD094237; Mon, 27 Nov 2023 12:21:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ARCLoXq094234; Mon, 27 Nov 2023 12:21:50 GMT (envelope-from git) Date: Mon, 27 Nov 2023 12:21:50 GMT Message-Id: <202311271221.3ARCLoXq094234@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 54b238b132af - main - databases/pear-DB: Import upstream patches List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54b238b132af2af8b8e1a13cb07816b3be6396c0 Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=54b238b132af2af8b8e1a13cb07816b3be6396c0 commit 54b238b132af2af8b8e1a13cb07816b3be6396c0 Author: Po-Chuan Hsieh AuthorDate: 2023-11-27 11:27:16 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-11-27 12:19:29 +0000 databases/pear-DB: Import upstream patches - Add lastId method [1] - Fix PHP 8.2 compatiblity [2] - Update WWW - Bump PORTREVISION for package change Obtained from: https://github.com/pear/DB/commit/90010c56379bd2b116172a9ea321282cb8389243 [1] https://github.com/pear/DB/commit/4efd340ec9eb1da23fa2df60d387c274e9c1100b (part of) [2] --- databases/pear-DB/Makefile | 4 +- databases/pear-DB/files/patch-..-package.xml | 54 +++ databases/pear-DB/files/patch-lastId | 92 ++++ databases/pear-DB/files/patch-php82 | 623 +++++++++++++++++++++++++++ 4 files changed, 772 insertions(+), 1 deletion(-) diff --git a/databases/pear-DB/Makefile b/databases/pear-DB/Makefile index f9716a62b72d..73cf0cd31289 100644 --- a/databases/pear-DB/Makefile +++ b/databases/pear-DB/Makefile @@ -1,11 +1,13 @@ PORTNAME= DB PORTVERSION= 1.11.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= databases www pear MAINTAINER= sunpoet@FreeBSD.org COMMENT= PEAR Database Abstraction Layer -WWW= https://pear.php.net/package/DB +WWW= https://pear.php.net/package/DB \ + https://github.com/pear/DB/ LICENSE= PHP301 diff --git a/databases/pear-DB/files/patch-..-package.xml b/databases/pear-DB/files/patch-..-package.xml new file mode 100644 index 000000000000..850a8f232fdc --- /dev/null +++ b/databases/pear-DB/files/patch-..-package.xml @@ -0,0 +1,54 @@ +--- ../package.xml.orig 2021-08-11 00:23:52 UTC ++++ ../package.xml +@@ -76,7 +76,7 @@ DB is compatible with PHP 5 and PHP 7. + + + +- ++ + + + +@@ -85,34 +85,34 @@ DB is compatible with PHP 5 and PHP 7. + + + +- ++ + + + + + +- ++ + + + + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + + diff --git a/databases/pear-DB/files/patch-lastId b/databases/pear-DB/files/patch-lastId new file mode 100644 index 000000000000..22cfbabe96b9 --- /dev/null +++ b/databases/pear-DB/files/patch-lastId @@ -0,0 +1,92 @@ +Obtained from: https://github.com/pear/DB/commit/90010c56379bd2b116172a9ea321282cb8389243 + +--- DB/common.php.orig 2021-08-11 00:23:52 UTC ++++ DB/common.php +@@ -1809,6 +1809,23 @@ class DB_common extends PEAR + } + + // }}} ++ // {{{ lastId() ++ ++ /** ++ * Returns the row ID of the most recent INSERT into the database ++ * ++ * @param string $link_identifier DBMS link identifier ++ * ++ * @return int the row ID of the most recent INSERT into the database. ++ * If no successful INSERTs into rowid tables have ever ++ * occurred on this database connection then returns 0. ++ */ ++ function lastId($link_identifier = null) ++ { ++ return $this->raiseError(DB_ERROR_NOT_CAPABLE); ++ } ++ ++ // }}} + // {{{ createSequence() + + /** +--- DB/mysql.php.orig 2021-08-11 00:23:52 UTC ++++ DB/mysql.php +@@ -654,6 +654,29 @@ class DB_mysql extends DB_common + } + + // }}} ++ // {{{ lastId() ++ ++ /** ++ * Returns the row ID of the most recent INSERT into the database ++ * ++ * @param string $link_identifier mysql link identifier ++ * ++ * @return int the row ID of the most recent INSERT into the database. ++ * If no successful INSERTs into rowid tables have ever ++ * occurred on this database connection then returns 0. ++ * ++ * @see DB_common::lastID() ++ */ ++ function lastId($link_identifier = null) ++ { ++ $id = mysql_insert_id($link_identifier); ++ if(empty($id) || !is_int($id)) { ++ return 0; ++ } ++ return $id; ++ } ++ ++ // }}} + // {{{ createSequence() + + /** +--- DB/mysqli.php.orig 2021-08-11 00:23:52 UTC ++++ DB/mysqli.php +@@ -739,6 +739,29 @@ class DB_mysqli extends DB_common + return $this->raiseError($result); + } + ++ // }}} ++ // {{{ lastId() ++ ++ /** ++ * Returns the row ID of the most recent INSERT into the database ++ * ++ * @param string $link_identifier mysqli link identifier ++ * ++ * @return int the row ID of the most recent INSERT into the database. ++ * If no successful INSERTs into rowid tables have ever ++ * occurred on this database connection then returns 0. ++ * ++ * @see DB_common::lastID() ++ */ ++ function lastId($link_identifier = null) ++ { ++ $id = $this->connection->insert_id(); ++ if(empty($id) || !is_int($id)) { ++ return 0; ++ } ++ return $id; ++ } ++ + /** + * Creates a new sequence + * diff --git a/databases/pear-DB/files/patch-php82 b/databases/pear-DB/files/patch-php82 new file mode 100644 index 000000000000..63b2115dbb05 --- /dev/null +++ b/databases/pear-DB/files/patch-php82 @@ -0,0 +1,623 @@ +Obtained from: https://github.com/pear/DB/commit/4efd340ec9eb1da23fa2df60d387c274e9c1100b (part of) + +--- DB/ibase.php.orig 2021-08-11 00:23:52 UTC ++++ DB/ibase.php +@@ -707,9 +707,9 @@ class DB_ibase extends DB_common + $repeat = 0; + do { + $this->pushErrorHandling(PEAR_ERROR_RETURN); +- $result = $this->query("SELECT GEN_ID(${sqn}, 1) " ++ $result = $this->query("SELECT GEN_ID({$sqn}, 1) " + . 'FROM RDB$GENERATORS ' +- . "WHERE RDB\$GENERATOR_NAME='${sqn}'"); ++ . "WHERE RDB\$GENERATOR_NAME='{$sqn}'"); + $this->popErrorHandling(); + if ($ondemand && DB::isError($result)) { + $repeat = 1; +@@ -746,7 +746,7 @@ class DB_ibase extends DB_common + { + $sqn = strtoupper($this->getSequenceName($seq_name)); + $this->pushErrorHandling(PEAR_ERROR_RETURN); +- $result = $this->query("CREATE GENERATOR ${sqn}"); ++ $result = $this->query("CREATE GENERATOR {$sqn}"); + $this->popErrorHandling(); + + return $result; +--- DB/msql.php.orig 2021-08-11 00:23:52 UTC ++++ DB/msql.php +@@ -443,7 +443,7 @@ class DB_msql extends DB_common + $repeat = false; + do { + $this->pushErrorHandling(PEAR_ERROR_RETURN); +- $result = $this->query("SELECT _seq FROM ${seqname}"); ++ $result = $this->query("SELECT _seq FROM {$seqname}"); + $this->popErrorHandling(); + if ($ondemand && DB::isError($result) && + $result->getCode() == DB_ERROR_NOSUCHTABLE) { +@@ -490,7 +490,7 @@ class DB_msql extends DB_common + if (DB::isError($res)) { + return $res; + } +- $res = $this->query("CREATE SEQUENCE ON ${seqname}"); ++ $res = $this->query("CREATE SEQUENCE ON {$seqname}"); + return $res; + } + +--- DB/mysql.php.orig 2021-08-11 00:23:52 UTC ++++ DB/mysql.php +@@ -590,7 +592,7 @@ class DB_mysql extends DB_common + do { + $repeat = 0; + $this->pushErrorHandling(PEAR_ERROR_RETURN); +- $result = $this->query("UPDATE ${seqname} ". ++ $result = $this->query("UPDATE {$seqname} ". + 'SET id=LAST_INSERT_ID(id+1)'); + $this->popErrorHandling(); + if ($result === DB_OK) { +@@ -602,7 +604,7 @@ class DB_mysql extends DB_common + // EMPTY SEQ TABLE + // Sequence table must be empty for some reason, so fill + // it and return 1 and obtain a user-level lock +- $result = $this->getOne("SELECT GET_LOCK('${seqname}_lock',10)"); ++ $result = $this->getOne("SELECT GET_LOCK('{$seqname}_lock',10)"); + if (DB::isError($result)) { + return $this->raiseError($result); + } +@@ -612,14 +614,14 @@ class DB_mysql extends DB_common + } + + // add the default value +- $result = $this->query("REPLACE INTO ${seqname} (id) VALUES (0)"); ++ $result = $this->query("REPLACE INTO {$seqname} (id) VALUES (0)"); + if (DB::isError($result)) { + return $this->raiseError($result); + } + + // Release the lock + $result = $this->getOne('SELECT RELEASE_LOCK(' +- . "'${seqname}_lock')"); ++ . "'{$seqname}_lock')"); + if (DB::isError($result)) { + return $this->raiseError($result); + } +@@ -676,12 +678,12 @@ class DB_mysql extends DB_common + return $res; + } + // insert yields value 1, nextId call will generate ID 2 +- $res = $this->query("INSERT INTO ${seqname} (id) VALUES (0)"); ++ $res = $this->query("INSERT INTO {$seqname} (id) VALUES (0)"); + if (DB::isError($res)) { + return $res; + } + // so reset to zero +- return $this->query("UPDATE ${seqname} SET id = 0"); ++ return $this->query("UPDATE {$seqname} SET id = 0"); + } + + // }}} +@@ -720,7 +722,7 @@ class DB_mysql extends DB_common + // Obtain a user-level lock... this will release any previous + // application locks, but unlike LOCK TABLES, it does not abort + // the current transaction and is much less frequently used. +- $result = $this->getOne("SELECT GET_LOCK('${seqname}_lock',10)"); ++ $result = $this->getOne("SELECT GET_LOCK('{$seqname}_lock',10)"); + if (DB::isError($result)) { + return $result; + } +@@ -730,7 +732,7 @@ class DB_mysql extends DB_common + return $this->mysqlRaiseError(DB_ERROR_NOT_LOCKED); + } + +- $highest_id = $this->getOne("SELECT MAX(id) FROM ${seqname}"); ++ $highest_id = $this->getOne("SELECT MAX(id) FROM {$seqname}"); + if (DB::isError($highest_id)) { + return $highest_id; + } +@@ -746,7 +748,7 @@ class DB_mysql extends DB_common + // If another thread has been waiting for this lock, + // it will go thru the above procedure, but will have no + // real effect +- $result = $this->getOne("SELECT RELEASE_LOCK('${seqname}_lock')"); ++ $result = $this->getOne("SELECT RELEASE_LOCK('{$seqname}_lock')"); + if (DB::isError($result)) { + return $result; + } +--- DB/mysqli.php.orig 2021-08-11 00:23:52 UTC ++++ DB/mysqli.php +@@ -684,7 +684,7 @@ class DB_mysqli extends DB_common + // so fill it and return 1 + // Obtain a user-level lock + $result = $this->getOne('SELECT GET_LOCK(' +- . "'${seqname}_lock', 10)"); ++ . "'{$seqname}_lock', 10)"); + if (DB::isError($result)) { + return $this->raiseError($result); + } +@@ -701,7 +701,7 @@ class DB_mysqli extends DB_common + + // Release the lock + $result = $this->getOne('SELECT RELEASE_LOCK(' +- . "'${seqname}_lock')"); ++ . "'{$seqname}_lock')"); + if (DB::isError($result)) { + return $this->raiseError($result); + } +@@ -759,7 +759,7 @@ class DB_mysqli extends DB_common + return $res; + } + // insert yields value 1, nextId call will generate ID 2 +- return $this->query("INSERT INTO ${seqname} (id) VALUES (0)"); ++ return $this->query("INSERT INTO {$seqname} (id) VALUES (0)"); + } + + // }}} +@@ -798,7 +798,7 @@ class DB_mysqli extends DB_common + // Obtain a user-level lock... this will release any previous + // application locks, but unlike LOCK TABLES, it does not abort + // the current transaction and is much less frequently used. +- $result = $this->getOne("SELECT GET_LOCK('${seqname}_lock',10)"); ++ $result = $this->getOne("SELECT GET_LOCK('{$seqname}_lock',10)"); + if (DB::isError($result)) { + return $result; + } +@@ -808,7 +808,7 @@ class DB_mysqli extends DB_common + return $this->mysqliRaiseError(DB_ERROR_NOT_LOCKED); + } + +- $highest_id = $this->getOne("SELECT MAX(id) FROM ${seqname}"); ++ $highest_id = $this->getOne("SELECT MAX(id) FROM {$seqname}"); + if (DB::isError($highest_id)) { + return $highest_id; + } +@@ -825,7 +825,7 @@ class DB_mysqli extends DB_common + // If another thread has been waiting for this lock, + // it will go thru the above procedure, but will have no + // real effect +- $result = $this->getOne("SELECT RELEASE_LOCK('${seqname}_lock')"); ++ $result = $this->getOne("SELECT RELEASE_LOCK('{$seqname}_lock')"); + if (DB::isError($result)) { + return $result; + } +--- DB/oci8.php.orig 2021-08-11 00:23:52 UTC ++++ DB/oci8.php +@@ -249,7 +249,7 @@ class DB_oci8 extends DB_common + $dsn['password'], + $db, + $char); +- $error = OCIError(); ++ $error = oci_error(); + if (!empty($error) && $error['code'] == 12541) { + // Couldn't find TNS listener. Try direct connection. + $this->connection = @$connect_function($dsn['username'], +@@ -270,7 +270,7 @@ class DB_oci8 extends DB_common + } + + if (!$this->connection) { +- $error = OCIError(); ++ $error = oci_error(); + $error = (is_array($error)) ? $error['message'] : null; + return $this->raiseError(DB_ERROR_CONNECT_FAILED, + null, null, null, +@@ -289,11 +289,7 @@ class DB_oci8 extends DB_common + */ + function disconnect() + { +- if (function_exists('oci_close')) { +- $ret = @oci_close($this->connection); +- } else { +- $ret = @OCILogOff($this->connection); +- } ++ $ret = @oci_close($this->connection); + $this->connection = null; + return $ret; + } +@@ -320,14 +316,14 @@ class DB_oci8 extends DB_common + $this->last_parameters = array(); + $this->last_query = $query; + $query = $this->modifyQuery($query); +- $result = @OCIParse($this->connection, $query); ++ $result = @oci_parse($this->connection, $query); + if (!$result) { + return $this->oci8RaiseError(); + } + if ($this->autocommit) { +- $success = @OCIExecute($result,OCI_COMMIT_ON_SUCCESS); ++ $success = @oci_execute($result,OCI_COMMIT_ON_SUCCESS); + } else { +- $success = @OCIExecute($result,OCI_DEFAULT); ++ $success = @oci_execute($result,OCI_DEFAULT); + } + if (!$success) { + return $this->oci8RaiseError($result); +@@ -336,7 +332,7 @@ class DB_oci8 extends DB_common + if ($this->_checkManip($query)) { + return DB_OK; + } else { +- @ocisetprefetch($result, $this->options['result_buffering']); ++ @oci_set_prefetch($result, $this->options['result_buffering']); + return $result; + } + } +@@ -387,14 +383,14 @@ class DB_oci8 extends DB_common + return $this->raiseError(DB_ERROR_NOT_CAPABLE); + } + if ($fetchmode & DB_FETCHMODE_ASSOC) { +- $moredata = @OCIFetchInto($result,$arr,OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS); ++ $moredata = @oci_fetch_array($result,$arr,OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS); + if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && + $moredata) + { + $arr = array_change_key_case($arr, CASE_LOWER); + } + } else { +- $moredata = OCIFetchInto($result,$arr,OCI_RETURN_NULLS+OCI_RETURN_LOBS); ++ $moredata = oci_fetch_array($result,$arr,OCI_RETURN_NULLS+OCI_RETURN_LOBS); + } + if (!$moredata) { + return null; +@@ -426,7 +422,7 @@ class DB_oci8 extends DB_common + */ + function freeResult($result) + { +- return is_resource($result) ? OCIFreeStatement($result) : false; ++ return is_resource($result) ? oci_free_statement($result) : false; + } + + /** +@@ -520,7 +516,7 @@ class DB_oci8 extends DB_common + */ + function numCols($result) + { +- $cols = @OCINumCols($result); ++ $cols = @oci_num_fields($result); + if (!$cols) { + return $this->oci8RaiseError($result); + } +@@ -592,7 +588,7 @@ class DB_oci8 extends DB_common + + $this->last_query = $query; + $newquery = $this->modifyQuery($newquery); +- if (!$stmt = @OCIParse($this->connection, $newquery)) { ++ if (!$stmt = @oci_parse($this->connection, $newquery)) { + return $this->oci8RaiseError(); + } + $this->prepare_types[(int)$stmt] = $types; +@@ -664,7 +660,7 @@ class DB_oci8 extends DB_common + $data[$key] = $this->quoteFloat($data[$key]); + } + } +- if (!@OCIBindByName($stmt, ':bind' . $i, $data[$key], -1)) { ++ if (!@oci_bind_by_name($stmt, ':bind' . $i, $data[$key], -1)) { + $tmp = $this->oci8RaiseError($stmt); + return $tmp; + } +@@ -673,9 +669,9 @@ class DB_oci8 extends DB_common + $i++; + } + if ($this->autocommit) { +- $success = @OCIExecute($stmt, OCI_COMMIT_ON_SUCCESS); ++ $success = @oci_execute($stmt, OCI_COMMIT_ON_SUCCESS); + } else { +- $success = @OCIExecute($stmt, OCI_DEFAULT); ++ $success = @oci_execute($stmt, OCI_DEFAULT); + } + if (!$success) { + $tmp = $this->oci8RaiseError($stmt); +@@ -688,7 +684,7 @@ class DB_oci8 extends DB_common + $tmp = DB_OK; + } else { + $this->_last_query_manip = false; +- @ocisetprefetch($stmt, $this->options['result_buffering']); ++ @oci_set_prefetch($stmt, $this->options['result_buffering']); + $tmp = new DB_result($this, $stmt); + } + return $tmp; +@@ -721,7 +717,7 @@ class DB_oci8 extends DB_common + */ + function commit() + { +- $result = @OCICommit($this->connection); ++ $result = @oci_commit($this->connection); + if (!$result) { + return $this->oci8RaiseError(); + } +@@ -738,7 +734,7 @@ class DB_oci8 extends DB_common + */ + function rollback() + { +- $result = @OCIRollback($this->connection); ++ $result = @oci_rollback($this->connection); + if (!$result) { + return $this->oci8RaiseError(); + } +@@ -760,7 +756,7 @@ class DB_oci8 extends DB_common + if ($this->last_stmt === false) { + return $this->oci8RaiseError(); + } +- $result = @OCIRowCount($this->last_stmt); ++ $result = @oci_num_rows($this->last_stmt); + if ($result === false) { + return $this->oci8RaiseError($this->last_stmt); + } +@@ -821,20 +817,20 @@ class DB_oci8 extends DB_common + } else { + $q_fields = "SELECT * FROM ($query) WHERE NULL = NULL"; + +- if (!$result = @OCIParse($this->connection, $q_fields)) { ++ if (!$result = @oci_parse($this->connection, $q_fields)) { + $this->last_query = $q_fields; + return $this->oci8RaiseError(); + } +- if (!@OCIExecute($result, OCI_DEFAULT)) { ++ if (!@oci_execute($result, OCI_DEFAULT)) { + $this->last_query = $q_fields; + return $this->oci8RaiseError($result); + } + } + +- $ncols = OCINumCols($result); ++ $ncols = oci_num_fields($result); + $cols = array(); + for ( $i = 1; $i <= $ncols; $i++ ) { +- $cols[] = '"' . OCIColumnName($result, $i) . '"'; ++ $cols[] = '"' . oci_field_name($result, $i) . '"'; + } + $fields = implode(', ', $cols); + // XXX Test that (tip by John Lim) +@@ -877,7 +873,7 @@ class DB_oci8 extends DB_common + $repeat = 0; + do { + $this->expectError(DB_ERROR_NOSUCHTABLE); +- $result = $this->query("SELECT ${seqname}.nextval FROM dual"); ++ $result = $this->query("SELECT {$seqname}.nextval FROM dual"); + $this->popExpect(); + if ($ondemand && DB::isError($result) && + $result->getCode() == DB_ERROR_NOSUCHTABLE) { +@@ -950,11 +946,11 @@ class DB_oci8 extends DB_common + function oci8RaiseError($errno = null) + { + if ($errno === null) { +- $error = @OCIError($this->connection); ++ $error = @oci_error($this->connection); + return $this->raiseError($this->errorCode($error['code']), + null, null, null, $error['message']); + } elseif (is_resource($errno)) { +- $error = @OCIError($errno); ++ $error = @oci_error($errno); + return $this->raiseError($this->errorCode($error['code']), + null, null, null, $error['message']); + } +@@ -973,9 +969,9 @@ class DB_oci8 extends DB_common + function errorNative() + { + if (is_resource($this->last_stmt)) { +- $error = @OCIError($this->last_stmt); ++ $error = @oci_error($this->last_stmt); + } else { +- $error = @OCIError($this->connection); ++ $error = @oci_error($this->connection); + } + if (is_array($error)) { + return $error['code']; +@@ -1029,21 +1025,21 @@ class DB_oci8 extends DB_common + + $this->last_query = $q_fields; + +- if (!$stmt = @OCIParse($this->connection, $q_fields)) { ++ if (!$stmt = @oci_parse($this->connection, $q_fields)) { + return $this->oci8RaiseError(DB_ERROR_NEED_MORE_DATA); + } +- if (!@OCIExecute($stmt, OCI_DEFAULT)) { ++ if (!@oci_execute($stmt, OCI_DEFAULT)) { + return $this->oci8RaiseError($stmt); + } + + $i = 0; +- while (@OCIFetch($stmt)) { ++ while (@oci_fetch($stmt)) { + $res[$i] = array( + 'table' => $case_func($result), +- 'name' => $case_func(@OCIResult($stmt, 1)), +- 'type' => @OCIResult($stmt, 2), +- 'len' => @OCIResult($stmt, 3), +- 'flags' => (@OCIResult($stmt, 4) == 'N') ? 'not_null' : '', ++ 'name' => $case_func(@oci_result($stmt, 1)), ++ 'type' => @oci_result($stmt, 2), ++ 'len' => @oci_result($stmt, 3), ++ 'flags' => (@oci_result($stmt, 4) == 'N') ? 'not_null' : '', + ); + if ($mode & DB_TABLEINFO_ORDER) { + $res['order'][$res[$i]['name']] = $i; +@@ -1057,7 +1053,7 @@ class DB_oci8 extends DB_common + if ($mode) { + $res['num_fields'] = $i; + } +- @OCIFreeStatement($stmt); ++ @oci_free_statement($stmt); + + } else { + if (isset($result->result)) { +@@ -1071,16 +1067,16 @@ class DB_oci8 extends DB_common + $res = array(); + + if ($result === $this->last_stmt) { +- $count = @OCINumCols($result); ++ $count = @oci_num_fields($result); + if ($mode) { + $res['num_fields'] = $count; + } + for ($i = 0; $i < $count; $i++) { + $res[$i] = array( + 'table' => '', +- 'name' => $case_func(@OCIColumnName($result, $i+1)), +- 'type' => @OCIColumnType($result, $i+1), +- 'len' => @OCIColumnSize($result, $i+1), ++ 'name' => $case_func(@oci_field_name($result, $i+1)), ++ 'type' => @oci_field_type($result, $i+1), ++ 'len' => @oci_field_size($result, $i+1), + 'flags' => '', + ); + if ($mode & DB_TABLEINFO_ORDER) { +--- DB/odbc.php.orig 2021-08-11 00:23:52 UTC ++++ DB/odbc.php +@@ -331,7 +331,7 @@ class DB_odbc extends DB_common + return null; + } + if ($fetchmode !== DB_FETCHMODE_ORDERED) { +- for ($i = 0; $i < count($arr); $i++) { ++ for ($i = 0, $iMax = count($arr); $i < $iMax; $i++) { + $colName = @odbc_field_name($result, $i+1); + $a[$colName] = $arr[$i]; + } +@@ -502,7 +502,7 @@ class DB_odbc extends DB_common + $repeat = 0; + do { + $this->pushErrorHandling(PEAR_ERROR_RETURN); +- $result = $this->query("update ${seqname} set id = id + 1"); ++ $result = $this->query("update {$seqname} set id = id + 1"); + $this->popErrorHandling(); + if ($ondemand && DB::isError($result) && + $result->getCode() == DB_ERROR_NOSUCHTABLE) { +@@ -513,7 +513,7 @@ class DB_odbc extends DB_common + if (DB::isError($result)) { + return $this->raiseError($result); + } +- $result = $this->query("insert into ${seqname} (id) values(0)"); ++ $result = $this->query("insert into {$seqname} (id) values(0)"); + } else { + $repeat = 0; + } +@@ -523,7 +523,7 @@ class DB_odbc extends DB_common + return $this->raiseError($result); + } + +- $result = $this->query("select id from ${seqname}"); ++ $result = $this->query("select id from {$seqname}"); + if (DB::isError($result)) { + return $result; + } +--- DB/pgsql.php.orig 2021-08-11 00:23:52 UTC ++++ DB/pgsql.php +@@ -460,7 +460,7 @@ class DB_pgsql extends DB_common + unset($this->row[(int)$result]); + unset($this->_num_rows[(int)$result]); + $this->affected = 0; +- return @pg_freeresult($result); ++ return @pg_free_result($result); + } + return false; + } +@@ -534,7 +534,7 @@ class DB_pgsql extends DB_common + */ + function numCols($result) + { +- $cols = @pg_numfields($result); ++ $cols = @pg_num_fields($result); + if (!$cols) { + return $this->pgsqlRaiseError(); + } +@@ -559,7 +559,7 @@ class DB_pgsql extends DB_common + */ + function numRows($result) + { +- $rows = @pg_numrows($result); ++ $rows = @pg_num_rows($result); + if ($rows === null) { + return $this->pgsqlRaiseError(); + } +@@ -664,7 +664,7 @@ class DB_pgsql extends DB_common + $repeat = false; + do { + $this->pushErrorHandling(PEAR_ERROR_RETURN); +- $result = $this->query("SELECT NEXTVAL('${seqname}')"); ++ $result = $this->query("SELECT NEXTVAL('{$seqname}')"); + $this->popErrorHandling(); + if ($ondemand && DB::isError($result) && + $result->getCode() == DB_ERROR_NOSUCHTABLE) { +@@ -703,7 +703,7 @@ class DB_pgsql extends DB_common + function createSequence($seq_name) + { + $seqname = $this->getSequenceName($seq_name); +- $result = $this->query("CREATE SEQUENCE ${seqname}"); ++ $result = $this->query("CREATE SEQUENCE {$seqname}"); + return $result; + } + +@@ -791,7 +791,7 @@ class DB_pgsql extends DB_common + */ + function errorNative() + { +- return @pg_errormessage($this->connection); ++ return @pg_last_error($this->connection); + } + + // }}} +@@ -916,7 +916,7 @@ class DB_pgsql extends DB_common + $case_func = 'strval'; + } + +- $count = @pg_numfields($id); ++ $count = @pg_num_fields($id); + $res = array(); + + if ($mode) { +@@ -926,9 +926,9 @@ class DB_pgsql extends DB_common + for ($i = 0; $i < $count; $i++) { + $res[$i] = array( + 'table' => $got_string ? $case_func($result) : '', +- 'name' => $case_func(@pg_fieldname($id, $i)), +- 'type' => @pg_fieldtype($id, $i), +- 'len' => @pg_fieldsize($id, $i), ++ 'name' => $case_func(@pg_field_name($id, $i)), ++ 'type' => @pg_field_type($id, $i), ++ 'len' => @pg_field_size($id, $i), + 'flags' => $got_string + ? $this->_pgFieldFlags($id, $i, $result) + : '', +@@ -943,7 +943,7 @@ class DB_pgsql extends DB_common + + // free the result only if we were called on a table + if ($got_string) { +- @pg_freeresult($id); ++ @pg_free_result($id); + } + return $res; + } +@@ -967,7 +967,7 @@ class DB_pgsql extends DB_common + */ + function _pgFieldFlags($resource, $num_field, $table_name) + { +- $field_name = @pg_fieldname($resource, $num_field); ++ $field_name = @pg_field_name($resource, $num_field); + + // Check if there's a schema in $table_name and update things + // accordingly. +@@ -986,7 +986,7 @@ class DB_pgsql extends DB_common + AND typ.typrelid = f.attrelid + AND f.attname = '$field_name' + AND $tableWhere"); +- if (@pg_numrows($result) > 0) { ++ if (@pg_num_rows($result) > 0) { + $row = @pg_fetch_row($result, 0); + $flags = ($row[0] == 't') ? 'not_null ' : ''; + +@@ -1010,7 +1010,7 @@ class DB_pgsql extends DB_common + AND f.attrelid = i.indrelid + AND f.attname = '$field_name' + AND $tableWhere"); +- $count = @pg_numrows($result); ++ $count = @pg_num_rows($result); + + for ($i = 0; $i < $count ; $i++) { + $row = @pg_fetch_row($result, $i); +--- DB/sqlite.php.orig 2021-08-11 00:23:52 UTC ++++ DB/sqlite.php +@@ -517,7 +517,7 @@ class DB_sqlite extends DB_common + if (DB::isError($result)) { + return($result); + } +- $query = "CREATE TRIGGER ${seqname}_cleanup AFTER INSERT ON $seqname ++ $query = "CREATE TRIGGER {$seqname}_cleanup AFTER INSERT ON $seqname + BEGIN + DELETE FROM $seqname WHERE id