Welcome Guest, Not a member yet? Register   Sign In
"message": "Uninitialized string offset: 0"
#13

(08-30-2020, 08:30 AM)jreklund Wrote: The docs dosen't state that it won't accept empty strings, but I can't see something obvious in the the source code that removes it. You will have to follow the trace from Query:479 and work your way up to see where it gets deleted.

If you cant solve it yourself, open an issue; https://github.com/codeigniter4/CodeIgniter4/issues


Hi thank you for your support.

i seen the error coming from file system/DataBase/Query.php line number 479

in real source file i have this line as

$escapedValue = $binds[$c][1] ? $this->db->escape($binds[$c][0]) : $binds[$c][0];


with this line i am getting error like uninitialized string at offset at 1  for the same prepare statement



so i changed into 

$escapedValue = isset($binds[$c][1]) ? $this->db->escape($binds[$c][1]) : $binds[$c][0];

with this change i got error like uninitialized string at offset at 0  for the same prepare statement

later i found the error i am getting is only if i try to empty string so i changed my field to accept null even though same error 

as you said i will raise issue in codeignitor 
thank you for your continuous support.
Reply


Messages In This Thread
RE: "message": "Uninitialized string offset: 0" - by regimon - 08-30-2020, 08:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB