The documentation for file_load() says that it returns "A file object". However, it will return FALSE if the file was not found. This patch documents that behavior.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | doc_file_load_return.patch | 428 bytes | liam morland |
| doc_file_load_return.patch | 409 bytes | liam morland |
Comments
Comment #1
jhodgdonGood catch! I agree with your assessment: FALSE will be returned if there is no file found.
I think the doc line needs a comma in it though: ", or FALSE if ..."
Actually, how about:
An object representing the file, or FALSE if...
Comment #2
liam morlandUpdated patch attached. I will write the D7 backport once the D8 one is approved.
Comment #3
jhodgdonLooks good, thanks! I'll get that committed (it will likely apply to both d7 and d8 with no extra work on your part, so don't bother with that yet).
Comment #4
jhodgdonCommitted to 8.x/7.x. Thanks!