Skip to content

Commit

Permalink
Merge pull request #32 from WP4Laravel/feature/missing-null-checks
Browse files Browse the repository at this point in the history
Missing null checks
  • Loading branch information
jgrossi authored Apr 27, 2017
2 parents 1f28c8b + 6f8786f commit cc24fa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Field/FlexibleContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function fetchFields($fieldName, Builder $builder)
$post = $this->post->ID != $meta->post_id ? $this->post->find($meta->post_id) : $this->post;
$field = FieldFactory::make($meta->meta_key, $post);

if (!array_key_exists($id, $blocks)) {
if ($field === null || !array_key_exists($id, $blocks)) {
continue;
}

Expand Down

0 comments on commit cc24fa0

Please sign in to comment.