CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

Bug: [OCI8] Argument #1 ($value) must be of type ?int, string given

Open allyblaise opened this issue 1 year ago • 2 comments

PHP Version

8.3

CodeIgniter4 Version

4.5.1

CodeIgniter4 Installation Method

Composer (as dependency to an existing project)

Which operating systems have you tested for this bug?

macOS

Which server did you use?

cli-server (PHP built-in webserver)

Database

ORACLE 19c

What happened?

TypeError: CodeIgniter\Database\BaseBuilder::limit(): Argument #1 ($value) must be of type ?int, string given, called in ../vendor/codeigniter4/framework/system/Model.php on line 919

Steps to Reproduce

Connect to oracle database using OCI8 with php8.2+

Expected Output

Allow database connection without a warning

Anything else?

No response

allyblaise avatar Apr 19 '24 11:04 allyblaise

Connect to oracle database using OCI8 with php8.2+

Cannot reproduce.

kenjis avatar Apr 19 '24 21:04 kenjis

Please show the model code you used in accessing the database.

paulbalandan avatar Apr 22 '24 14:04 paulbalandan

This is because you passed a string value to the limit() method. Please pass an integer value.

TypeError: CodeIgniter\Database\BaseBuilder::limit(): Argument #1 ($value) must be of type ?int, string given, called in ../vendor/codeigniter4/framework/system/Model.php on line 919

https://github.com/codeigniter4/CodeIgniter4/blob/432d7249c6dfd4e781042c463201d1da95e49e83/system/Model.php#L919

kenjis avatar Jun 22 '24 06:06 kenjis