Welcome Guest, Not a member yet? Register   Sign In
str_replace(): Argument #3 ($subject) must be of type array|string, int given
#1

(This post was last modified: 06-02-2024, 01:27 AM by warcooft.)

Hi everyone,
im using number helper and implement number_to_amount() method then i faced data type error as follows:

[Image: xyASCX.jpg] 

when I try to give number with string data type this method works normally,
 
PHP Code:
number_to_amount($model->countAll(), 2'id'); // error: ($subject) must be of type array|string, int given
number_to_amount('123'2'id'); // run normally 

in previous version 4.4.8 there was no such problem.
@xxxx[{::::::::::::::::::::::::::::::::>
Reply
#2

This is a bug.
https://github.com/codeigniter4/CodeIgniter4/pull/8932
Reply
#3

(06-02-2024, 02:09 AM)kenjis Wrote: This is a bug.
https://github.com/codeigniter4/CodeIgniter4/pull/8932

Thanks @kenjis
@xxxx[{::::::::::::::::::::::::::::::::>
Reply




Theme © iAndrew 2016 - Forum software by © MyBB