Skip to content

Commit

Permalink
Merge pull request #2746 from xwp/bugfix/customizer-widget-visibility…
Browse files Browse the repository at this point in the history
…-undefined-index

Fix undefined index for conditions POST var in Customizer
  • Loading branch information
zinigor committed Mar 22, 2016
2 parents 667c6a3 + e3f7d8c commit 326ef81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/widget-visibility/widget-conditions.php
Expand Up @@ -312,6 +312,10 @@ public static function widget_conditions_admin( $widget, $return, $instance ) {
* @return array Modified settings.
*/
public static function widget_update( $instance, $new_instance, $old_instance ) {
if ( empty( $_POST['conditions'] ) ) {
return $instance;
}

$conditions = array();
$conditions['action'] = $_POST['conditions']['action'];
$conditions['rules'] = array();
Expand Down

0 comments on commit 326ef81

Please sign in to comment.