Skip to content

Commit

Permalink
correct php notice
Browse files Browse the repository at this point in the history
  • Loading branch information
Hube2 committed Dec 1, 2020
1 parent a788c17 commit 7cc1c40
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion acf-post2post.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: ACF Post-2-Post
Plugin URI: https://github.com/Hube2/acf-post2post
Description: Two way relationship fields
Version: 1.5.1
Version: 1.5.2
Author: John A. Huebner II
Author URI: https://github.com/Hube2
License: GPL v2 or later
Expand Down Expand Up @@ -95,6 +95,10 @@ private function remove_relationship($post_id, $field_name, $related_id) {
$related_id = the relationship to remove
*/
$field = $this->get_field($post_id, $field_name);
if (!$field) {
// field not found attached to this post
return;
}
$array_value = true;
if ($field['type'] == 'post_object') {
if (!$field['multiple']) {
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: Hube2
Tags: acf, advanced custom fields, add on, bidirectional, 2 way, two way, relationship
Requires at least: 4.0
Tested up to: 5.5
Stable tag: 1.5.1
Stable tag: 1.5.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -118,6 +118,9 @@ function my_post_updated_action($posts) {

== Changelog ==

= 1.5.2 =
* Corrected PHP Notice: Trying to access array offset on value of type bool lines 99 & 130

= 1.5.1 =
* Removed Github Updater Support

Expand Down

0 comments on commit 7cc1c40

Please sign in to comment.