| @@ -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 ] ); |