Skip to content

Commit

Permalink
Prevent fatal error when field not exists and calling it by type
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Boom committed Feb 24, 2017
1 parent e288e28 commit e09270b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AdvancedCustomFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ public function __call($name, $arguments)

$field = FieldFactory::make($arguments[0], $this->post, snake_case($name));

return $field->get();
return $field ? $field->get() : null;
}
}

0 comments on commit e09270b

Please sign in to comment.