/**
* @param array $query
- * @return string
+ * @return array|null
*/
function fetchImageQuery( $query ) {
global $wgLanguageCode;
if ( !$knownThumbUrls ) {
/* No knownThumbUrls for this file */
$knownThumbUrls = [];
- } else {
- if ( isset( $knownThumbUrls[$sizekey] ) ) {
- wfDebug( __METHOD__ . ': Got thumburl from local cache: ' .
- "{$knownThumbUrls[$sizekey]} \n" );
+ } elseif ( isset( $knownThumbUrls[$sizekey] ) ) {
+ wfDebug( __METHOD__ . ': Got thumburl from local cache: ' .
+ "{$knownThumbUrls[$sizekey]} \n" );
- return $knownThumbUrls[$sizekey];
- }
- /* This size is not yet known */
+ return $knownThumbUrls[$sizekey];
}
$metadata = null;
}
/**
- * Like a Http:get request, but with custom User-Agent.
- * @see Http::get
+ * Like a HttpRequestFactory::get request, but with custom User-Agent.
+ * @see HttpRequestFactory::get
+ * @todo Can this use HttpRequestFactory::get() but just pass the 'userAgent' option?
* @param string $url
* @param string $timeout
* @param array $options