X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Ffilebackend%2FFileBackendStore.php;h=9b901dd1d1be7218f93688591988d25d757db44c;hb=b5fc03a7bfe46f434e332613c477e0ce9fe50e09;hp=aa95ee40bfe04a8d6ff9ca00f85df1b9287fc867;hpb=eb4ac89d6690ed4504206de5678a9a50e5edaadf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/filebackend/FileBackendStore.php b/includes/libs/filebackend/FileBackendStore.php index aa95ee40bf..9b901dd1d1 100644 --- a/includes/libs/filebackend/FileBackendStore.php +++ b/includes/libs/filebackend/FileBackendStore.php @@ -604,7 +604,7 @@ abstract class FileBackendStore extends FileBackend { $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" ); $stat = $this->getFileStat( $params ); - return ( $stat === null ) ? null : (bool)$stat; // null => failure + return ( $stat === self::UNKNOWN ) ? self::UNKNOWN : (bool)$stat; } final public function getFileTimestamp( array $params ) { @@ -637,7 +637,7 @@ abstract class FileBackendStore extends FileBackend { // cache entries from mass object listings that do not include the SHA-1. In that // case, loading the persistent stat cache will likely yield the SHA-1. if ( - $stat === null || + $stat === self::UNKNOWN || ( $requireSHA1 && is_array( $stat ) && !isset( $stat['sha1'] ) ) ) { $this->primeFileCache( [ $path ] ); // check persistent cache @@ -936,7 +936,7 @@ abstract class FileBackendStore extends FileBackend { $res = true; break; // found one! } elseif ( $exists === null ) { // error? - $res = null; // if we don't find anything, it is indeterminate + $res = self::UNKNOWN; // if we don't find anything, it is indeterminate } } @@ -957,7 +957,7 @@ abstract class FileBackendStore extends FileBackend { final public function getDirectoryList( array $params ) { list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] ); if ( $dir === null ) { // invalid storage path - return null; + return self::UNKNOWN; } if ( $shard !== null ) { // File listing is confined to a single container/shard @@ -987,7 +987,7 @@ abstract class FileBackendStore extends FileBackend { final public function getFileList( array $params ) { list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] ); if ( $dir === null ) { // invalid storage path - return null; + return self::UNKNOWN; } if ( $shard !== null ) { // File listing is confined to a single container/shard