Welcome Guest, Not a member yet? Register   Sign In
Time class big bug
#1

(This post was last modified: 10-29-2022, 03:01 AM by kenjis.)

We found a big bug in Time class.
The class is stated as immutable in the docs, but some methods can alter the object state.

We would like to fix the bug, but it is a breaking change.
If users are using following methods in Time, the result will be changed if the bug is fixed.
add()
modify()
setDate()
setISODate()
setTime()
sub()

Do you agree with fixing Time or not?
If you don't use Time or the methods above, you are not affected if Time is fixed.

See https://github.com/codeigniter4/CodeIgni...ssues/6762 for details.
Reply
#2

i only use now(), so it looks like i won't be affected but in principle better to address bugs , so yes fix it please.
CMS CI4     I use Arch Linux by the way 

Reply
#3

(10-30-2022, 02:35 AM)captain-sensible Wrote: i only use now(), so it looks like i won't be affected  but in principle better to address  bugs  , so yes fix it please.

Thank you for reply.
Yes, now() does not use Time, so you won't be affected.
Reply
#4

Use modify(), but i can fix my code. not too critical
Reply
#5

Yes
Bug must be fixed, even if the fix makes breaking changes.
Others, all affected will must adapt to that.
Reply
#6

If we wait to fix the bug it will end up causing bigger problems later on, we should fix it now.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#7

in the last 2 projects, I started using time :p, It should be fixed at the earliest. Smile
Learning Codeigniter 
Reply
#8

Thank you, all.

This bug will be fixed in v4.3.0.

See https://github.com/codeigniter4/CodeIgniter4/pull/6771
Reply




Theme © iAndrew 2016 - Forum software by © MyBB