You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the function file_get_info() has a docblock stating that it always returns an array, but it clearly does not as the first if statement will return FALSE instead of an array. This can easily lead to bugs as the code using the file_get_info() can easily assume this coming from the docblock comment.
The fix would be:
either update the docblock to mention that the function can also return a boolean false @return array => @return array|false
change the return to an empty array instead of boolean false
Please find the function doblock return type below.
Hi,
the function
file_get_info()
has a docblock stating that it always returns an array, but it clearly does not as the first if statement will return FALSE instead of an array. This can easily lead to bugs as the code using the file_get_info() can easily assume this coming from the docblock comment.The fix would be:
@return array
=>@return array|false
Please find the function doblock return type below.
CodeIgniter/system/helpers/file_helper.php
Line 259 in 63d0375
The text was updated successfully, but these errors were encountered: