Skip to content

Bug: TypeError in pg_ping() #9043

@warcooft

Description

@warcooft

PHP Version

8.3

CodeIgniter4 Version

4.5.3

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

macOS

Which server did you use?

apache

Database

PostgreSQL 16.3

What happened?

pg_ping() expects the first parameter to be a PostgreSQL connection (or null), but receives the boolean value false.

See also codeigniter4/queue#45 (comment)

This is a blocker for other packages.

Screenshot 2024-07-11 at 05 47 49

Steps to Reproduce

$db = db_connect();
d($db->connect());
d($db->close());
d($db->reconnect());
d($db->getDatabase());
d($db->getVersion());
dd();

Expected Output

The output should show the db name and db driver version.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions