Skip to content

Commit

Permalink
Merge pull request #60 from johannesx75/patch-4
Browse files Browse the repository at this point in the history
Fix: setting error fails if record does not exist
  • Loading branch information
dhensby committed Dec 28, 2016
2 parents adb3f6f + 3cfcaec commit ae9fd88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/model/StaticPagesQueue.php
Expand Up @@ -146,6 +146,8 @@ public static function has_error( $url ) {
if(!$url) return;

$existingObject = self::get_by_link($url);
if(!$existingObject) return;

$existingObject->Freshness = 'error';
$existingObject->write();
}
Expand Down

0 comments on commit ae9fd88

Please sign in to comment.