Skip to content

Commit

Permalink
SyndicatedPost / frozen_value - avoid Countable error when null is re…
Browse files Browse the repository at this point in the history
…turned for this meta field.
  • Loading branch information
radgeek committed Jan 23, 2022
1 parent 43657fa commit b3667c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syndicatedpost.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1331,8 +1331,8 @@ function freshness ($format = 'number') {
if ($updated) : // Ignore if the post is frozen
$frozen = ('yes' == $this->link->setting('freeze updates', 'freeze_updates', NULL));
if (!$frozen) :
$frozen_values = get_post_custom_values('_syndication_freeze_updates', $old_post->ID);
$frozen = (count($frozen_values) > 0 and 'yes' == $frozen_values[0]);
$frozen_value = get_post_meta($old_post->ID, '_syndication_freeze_updates', /*single=*/ true);
$frozen = (!is_null($frozen_value) and ('yes' == $frozen_value));

if ($frozen) :
$updatedReason = ' IS BLOCKED FROM BEING UPDATED BY A UPDATE LOCK ON THIS POST, EVEN THOUGH IT '.$updatedReason;
Expand Down

0 comments on commit b3667c2

Please sign in to comment.