Skip to content

Commit

Permalink
fix(fatal): avoid crash on malformed widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 authored Jun 10, 2022
1 parent 2a8135a commit e923bd8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions class.wph-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,10 @@ function create_fields($out = "") {
$out = $this->before_create_fields($out);

if (!empty($this->fields)) {
foreach ($this->fields as $key) {
$out .= $this->create_field($key);
foreach ($this->fields as $key) {
if ( is_array($key) ) {
$out .= $this->create_field($key);
}
}
}

Expand Down

0 comments on commit e923bd8

Please sign in to comment.