PluginProbe
WebberZone Top 10 — Popular Posts / 4.5.2
WebberZone Top 10 — Popular Posts v4.5.2
4.5.2 4.5.1 4.5.0 4.4.3 4.4.2 4.4.1 4.4.0 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 trunk 1.0 1.0.1 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 All 118 releases
← All changes | includes/options-api.php +4 -2 4.5.0 → 4.5.2 View file →
@@ -104,9 +104,10 @@
104 104 return $remove_option;
105 105 }
106 106
107 107 // First let's grab the current settings.
108 - $options = get_option( 'tptn_settings' );
108 + $options = get_option( 'tptn_settings', array() );
109 + $options = is_array( $options ) ? $options : array();
109 110
110 111 // Let's let devs alter that value coming in.
111 112 /**
112 113 * Filters a setting value before it is written to the options table.
@@ -148,9 +149,10 @@
148 149 return false;
149 150 }
150 151
151 152 // First let's grab the current settings.
152 - $options = get_option( 'tptn_settings' );
153 + $options = get_option( 'tptn_settings', array() );
154 + $options = is_array( $options ) ? $options : array();
153 155
154 156 // Next let's try to update the value.
155 157 if ( isset( $options[ $key ] ) ) {
156 158 unset( $options[ $key ] );