Fix "ob_get_*() === false will always evaluate to false" false positive#6097
Conversation
|
This pull request has been marked as ready for review. |
|
I don't like this fix cause this just seems to be a hack in order to satisfy one issue but some others could be open like the fact that ob_get_level doesn't return the right value if a ob_start fail. Honestly I wonder if we should just revert #5964 The right fix is technically #6087 but maybe we could simplify it. |
IMO the whole point of this issue was/is, that checking error state return values of thats why error states are not checked. so thats why I think benevolent is the right tool for the job, as it helps us to treat not important error states in a less aggressive way |
I kinda agree with your fix. I'm just annoyed by the assertiong It's like ob_start could technically fail for ob_clean but not for ob_get_level... Anyway that might be good enough. |
|
thank you @VincentLanglet |
Fixes phpstan/phpstan#14985