Issue #201: Resolve unit test failures with PHP7.4

This commit is contained in:
Nicholas Hoobin
2020-07-06 14:20:51 +10:00
parent a62be02438
commit 6f65ff9199
2 changed files with 2 additions and 2 deletions

View File

@@ -128,7 +128,7 @@ class maintenance_static_page_generator {
continue;
}
$saved = $this->io->save_url_file($href);
if (is_null($saved['url'])) {
if (empty($saved['url'])) {
$url = $href; // Skipped, use original URL.
} else {
$this->update_link_stylesheet_parse($saved['file'], dirname($href));

View File

@@ -213,7 +213,7 @@ class maintenance_static_page_io {
/**
* Saves the content of the URL into a file, returning the local filename.
* @param string $url Input URL.
* @return string|null Output filename or null if skipped.
* @return array|null Output an array with the filename and url or null if skipped.
*/
public function save_url_file($url) {
global $CFG;