Explorar o código

Fix return type for broken feeds (#3423)

Fix a rare error when an invalid feed is forced to be added again.
FreshRSS code (not upstream)
Alexandre Alapetite %!s(int64=5) %!d(string=hai) anos
pai
achega
23c43b1fbf
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/SimplePie/SimplePie.php

+ 1 - 1
lib/SimplePie/SimplePie.php

@@ -1424,7 +1424,7 @@ class SimplePie
 			// Fetch the data via SimplePie_File into $this->raw_data
 			if (($fetched = $this->fetch_data($cache)) === true)
 			{
-				return $this->data['mtime'];
+				return empty($this->data['mtime']) ? false : $this->data['mtime'];
 			}
 			elseif ($fetched === false) {
 				return false;