Fix update email spot position image link

This commit is contained in:
2022-04-13 19:07:06 +02:00
parent 0e353bee39
commit 4b88759173
2 changed files with 4 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ class Feed extends PhpObject {
public function getLastMessageId($asConstraints=array()) {
$asMessages = $this->getMessages($asConstraints);
return end($asMessages)[Db::getId(self::MSG_TABLE)];
return end($asMessages)[Db::getId(self::MSG_TABLE)] ?? 0;
}
public function checkUpdateFeed($sProjectMode) {
@@ -151,8 +151,8 @@ class Feed extends PhpObject {
$oLastUpdate = new \DateTime('@'.$this->iLastUpdate);
$oNow = new \DateTime('now');
$iSecDiff = $oNow->getTimestamp() - $oLastUpdate->getTimestamp();
if($iSecDiff > self::FEED_MAX_REFRESH && !Settings::DEBUG) $bNewMsg = $this->updateFeed();
if($iSecDiff > self::FEED_MAX_REFRESH) $bNewMsg = $this->updateFeed();
}
return $bNewMsg;