corcel / acf

Advanced Custom Fields (ACF) plugin for Corcel
127 stars 100 forks source link

Prevent double query and issue with non existing custom field #20

Closed marcoboom closed 7 years ago

marcoboom commented 7 years ago

1 In a Repeater or Flexible content an instance of Post is send through the new instance of a subfield. In most cases this will be the same post as the post which is send through the Repeater or Flexible content. To check of the post_id is the same as the post in the current object we prevent some double queries.

2 Prevent fatal error when a post does not have a certain custom fields when calling it by type. This is the same issue as solved in https://github.com/corcel/acf/commit/30683cb1e209e00959d215c849eef7697d4e50d1.