/**
* Gets info array from given URL, cached data has priority
*
- * @param string $url URL
+ * @param string $url
* @return array Info
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
DI::cache()->set($cacheKey, $data);
}
- return $data;
+ return $data ?? [];
}
/**
* Gets info from URL uncached
- * @param string $url URL
+ *
+ * @param string $url
* @return array Info array
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
$data['size'] = $filesize;
}
- return $data;
+ return is_array($data) ? $data : [];
}
/**