Don't try to call load() on non-object
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Fri, 10 Jul 2015 14:31:33 +0000 (16:31 +0200)
committerFlorian <florian.schmidt.stargatewissen@gmail.com>
Fri, 10 Jul 2015 18:35:02 +0000 (20:35 +0200)
commit034402b7a0fc208854179e514282fa4ed0330aed
treeadde2f1ac58809e21fcfe99609db264f435bf044
parentf9b579efc6d3116cdc322a4f8c8fe05b079d9e9c
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
includes/filerepo/FileRepo.php