Skip to content

Bug: [QueryBuilder] join() with BETWEEN causes TypeError preg_quote(): Argument #1 ($str) must be of type string, false given #8791

Closed
@oakhurstmgmt

Description

@oakhurstmgmt

PHP Version

8.3

CodeIgniter4 Version

4.5.1

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Windows, Linux

Which server did you use?

apache

Database

MariaDB 11.2.3

What happened?

After upgrading to 4.5.0 and then 4.5.1, I am now getting TypeError preg_quote(): Argument #1 ($str) must be of type string, false given at SYSTEMPATH/Database/BaseBuilder.php at line 680 with some of my SQL queries. These queries all use the BETWEEN Operator to compare dates.

These queries worked perfectly fine going all the way back to CI 4.0.x up through 4.4.8.

Below is a screenshot of the error:
Screenshot 2024-04-15 at 10-50-16 TypeError

Steps to Reproduce

Execute an SQL query created using the Query Builder Class utilizing the BETWEEN operator.

Expected Output

A view with the results of the SQL query.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix themdatabaseIssues or pull requests that affect the database layer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions