corcel / acf

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

fixed a missing null check in Repeater.php #46

Closed jakobbuis closed 7 years ago

jakobbuis commented 7 years ago

Encountered a null pointer bug in production last month. I think the reproduction path is:

  1. Create a repeater, add two fields to it
  2. Add some content to a post in those fields
  3. Delete one of the fields.

Corcel than returns null from the FieldFactory, but still tries to use the field.

Added a null check to prevent it.

jgrossi commented 7 years ago

@jakobbuis thanks!