From e52964218a77f8a7476422b1aaeb1c79f4241502 Mon Sep 17 00:00:00 2001 From: Saif Sultan Date: Thu, 6 Feb 2025 00:11:39 +0530 Subject: [PATCH] `gw-cache-buster.php`: Fixed an issue with Cache Buster plugin causing fatal error. --- gravity-forms/gw-cache-buster.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gravity-forms/gw-cache-buster.php b/gravity-forms/gw-cache-buster.php index 8ea55210..021510fb 100644 --- a/gravity-forms/gw-cache-buster.php +++ b/gravity-forms/gw-cache-buster.php @@ -9,7 +9,7 @@ * Plugin URI: https://gravitywiz.com/cache-busting-with-gravity-forms/ * Description: Bypass your website cache when loading a Gravity Forms form. * Author: Gravity Wiz - * Version: 0.6.3 + * Version: 0.6.4 * Author URI: https://gravitywiz.com */ class GW_Cache_Buster { @@ -68,7 +68,7 @@ public function set_form_styles( $form, $style_settings, $form_theme ) { // Form styles specifically set to false disables inline form css styles. $form_styles = false; } else { - $form_styles = ! empty( $style_settings ) ? json_decode( $style_settings, true ) : array(); + $form_styles = is_array( $style_settings ) ? $style_settings : ( ! empty( $style_settings ) ? json_decode( $style_settings, true ) : array() ); } // Removing theme from styles for consistency. $form['theme'] should be used instead.