Bug 272927 - databases/pear-MDB: php81-pear-MDB2-2.5.0.b5 generates a fatal error
Summary: databases/pear-MDB: php81-pear-MDB2-2.5.0.b5 generates a fatal error
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-04 01:46 UTC by Joel Rodriguez
Modified: 2023-09-04 09:21 UTC (History)
1 user (show)

See Also:
linimon: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Rodriguez 2023-08-04 01:46:53 UTC
Generates a fatal error - ($value) must be of type Countable|array

The code:

       if (!count($dsn)) {
            return $parsed;
        }

Suggested fix:

       if (!count(array($dsn))) {
            return $parsed;
        }
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-09-04 09:11:01 UTC
A commit in branch main references this bug:

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 (new) | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-09-04 09:21:42 UTC
Committed. Thanks!