git: 8b461858eff2 - main - databases/pear-MDB2: Fix PHP error
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 04 Sep 2023 09:08:49 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8b461858eff28db7abaa758fa41847622ee48cd1
commit 8b461858eff28db7abaa758fa41847622ee48cd1
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-09-04 09:04:43 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-09-04 09:04:43 +0000
databases/pear-MDB2: Fix PHP error
- Bump PORTREVISION for package change
PR: 272927
Reported by: Joel Rodriguez <joel@tahoestores.com>
Obtained from: https://github.com/pear/MDB2/commit/ee0563d1ac6ed2694c48701e24ed7c352edb6639
---
databases/pear-MDB2/Makefile | 1 +
databases/pear-MDB2/files/patch-MDB2.php | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/databases/pear-MDB2/Makefile b/databases/pear-MDB2/Makefile
index f9361d812716..9f1bf0c93c28 100644
--- a/databases/pear-MDB2/Makefile
+++ b/databases/pear-MDB2/Makefile
@@ -1,5 +1,6 @@
PORTNAME= MDB2
DISTVERSION= 2.5.0b5
+PORTREVISION= 1
CATEGORIES= databases www pear
MAINTAINER= sunpoet@FreeBSD.org
diff --git a/databases/pear-MDB2/files/patch-MDB2.php b/databases/pear-MDB2/files/patch-MDB2.php
new file mode 100644
index 000000000000..a6f918aac6dd
--- /dev/null
+++ b/databases/pear-MDB2/files/patch-MDB2.php
@@ -0,0 +1,23 @@
+Obtained from: https://github.com/pear/MDB2/commit/ee0563d1ac6ed2694c48701e24ed7c352edb6639
+
+--- MDB2.php.orig 2012-10-29 15:41:51 UTC
++++ MDB2.php
+@@ -575,7 +575,7 @@ class MDB2
+ $dummy3 = false)
+ {
+ $pear = new PEAR;
+- $err =& $pear->raiseError(null, $code, $mode, $options, $userinfo, 'MDB2_Error', true);
++ $err = $pear->raiseError(null, $code, $mode, $options, $userinfo, 'MDB2_Error', true);
+ return $err;
+ }
+
+@@ -823,7 +823,8 @@ class MDB2
+ $parsed['dbsyntax'] = $str;
+ }
+
+- if (!count($dsn)) {
++ $dsn = trim($dsn);
++ if (!strlen($dsn)) {
+ return $parsed;
+ }
+