psalm
psalm copied to clipboard
Fix DateTimeImmutable::sub() to not return false
@Ocramius The ->sub()
issue is separate from this, this issue is only for ->modify()
, but I do believe ->sub()
was incorrect in your PR, here's an example for that special case you found: https://3v4l.org/TIWRB
It indeed gives a warning and returns a clone, so there's no false
return.
Also, go get some sleep :stuck_out_tongue:
Originally posted by @AndrolGenhald in https://github.com/vimeo/psalm/issues/8454#issuecomment-1238386327
Hey @AndrolGenhald, can you reproduce the issue on https://psalm.dev ?