Skip to content

Commit 2c915d4

Browse files
committed
Only execute style vars foreach if is an array
See https://wordpress.org/support/topic/unable-to-update-plugin-22/
1 parent 2d38c5e commit 2c915d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/my-calendar-core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ function mc_admin_head() {
906906
$styles = (array) mc_get_option( 'style_vars' );
907907
$style_vars = '';
908908
foreach ( $styles as $key => $var ) {
909-
if ( 'text' === $key ) {
909+
if ( 'text' === $key && is_array( $var ) ) {
910910
foreach ( $var as $variable => $text ) {
911911
if ( $variable ) {
912912
$style_vars .= sanitize_key( $variable ) . ': ' . esc_html( $text ) . '; ';

0 commit comments

Comments
 (0)