Skip to content

Commit

Permalink
corrected fatal error
Browse files Browse the repository at this point in the history
  • Loading branch information
Hube2 committed Oct 21, 2016
1 parent 485fbe4 commit ac70360
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions acf-post2post.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: Post2Post for ACF
Plugin URI: https://github.com/Hube2/acf-post2post
Description: Two way relationship fields
Version: 1.2.1
Version: 1.2.2
Author: John A. Huebner II
Author URI: https://github.com/Hube2
GitHub Plugin URI: https://github.com/Hube2/acf-post2post
Expand Down Expand Up @@ -147,7 +147,7 @@ private function add_relationship($post_id, $field_name, $related_id) {
if (!is_array($value)) {
$value = array($value);
}
if (($max_posts == 0 || $count($value) < $max_posts) &&
if (($max_posts == 0 || count($value) < $max_posts) &&
!in_array($related_id, $value)) {
$value[] = $related_id;
} elseif ($max_posts > 0) {
Expand Down

0 comments on commit ac70360

Please sign in to comment.