Skip to content

Commit

Permalink
Add check so $values is a array before using it as a array
Browse files Browse the repository at this point in the history
  • Loading branch information
frozzare committed Apr 13, 2016
1 parent 90014af commit 55b35eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/properties/class-papi-property-repeater.php
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ protected function render_repeater_head() {
protected function render_repeater_rows() {
$items = $this->get_settings_properties();
$values = $this->get_value();
$values = is_array( $values ) ? $values : [];
$slugs = wp_list_pluck( $items, 'slug' );

// Remove values that don't exists in the slugs array.
Expand Down

0 comments on commit 55b35eb

Please sign in to comment.