HomePhabricator

Don't try to call load() on non-object

Authored by Florian.

Description

Don't try to call load() on non-object

FileRepo::newFile() can return null or false, in addition to a File
object. Calling load() on the returned value in FileRepo::findFile()
can result in an exception. Prevent this with an additional check after
FileRepo::newFile() was called.

Follow up: I1aa4b096c0cad5f5ca34321cc897019005c53a76
Follow up: I60c106b5b27db067b1884af95f5fb74a0a682a9a

Bug: T105497
Change-Id: Iabdae8fd960d19a467dc08a193228978575017ce

Details

Committed
FlorianJul 10 2015, 6:35 PM
Parents
rMWf9b579efc6d3: Fix sql.php behavior on error
Branches
Unknown
Tags
Unknown
ChangeId
Iabdae8fd960d19a467dc08a193228978575017ce