Index: trunk/phase3/includes/filerepo/backend/FileBackend.php |
— | — | @@ -405,16 +405,17 @@ |
406 | 406 | |
407 | 407 | /** |
408 | 408 | * Get quick information about a file at a storage path in the backend. |
409 | | - * The result is an associative array that includes: |
410 | | - * mtime : the last-modified timestamp (TS_MW) or false |
411 | | - * size : the file size (bytes) or false |
| 409 | + * If the file does not exist, then this returns false. |
| 410 | + * Otherwise, the result is an associative array that includes: |
| 411 | + * mtime : the last-modified timestamp (TS_MW) |
| 412 | + * size : the file size (bytes) |
412 | 413 | * |
413 | 414 | * $params include: |
414 | 415 | * src : source storage path |
415 | 416 | * latest : use the latest available data |
416 | 417 | * |
417 | 418 | * @param $params Array |
418 | | - * @return Array|false Returns false on failure |
| 419 | + * @return Array|false|null Returns null on failure |
419 | 420 | */ |
420 | 421 | abstract public function getFileStat( array $params ); |
421 | 422 | |
— | — | @@ -867,7 +868,11 @@ |
868 | 869 | * @see FileBackendBase::fileExists() |
869 | 870 | */ |
870 | 871 | final public function fileExists( array $params ) { |
871 | | - return (bool)$this->getFileStat( $params ); |
| 872 | + $stat = $this->getFileStat( $params ); |
| 873 | + if ( $stat === null ) { |
| 874 | + return null; // failure |
| 875 | + } |
| 876 | + return (bool)$stat; |
872 | 877 | } |
873 | 878 | |
874 | 879 | /** |