fix routine to update options without custom changes (#31)
array_merge_recursive() results in a misbehavior making arrays from scalar options when current and default values differ. Replcae it by array_replace_recursive() should resolve the issue for now.
This commit is contained in:
parent
3b169b28a7
commit
fcf251967f
@ -205,7 +205,7 @@ class StatifyBlacklist_System extends StatifyBlacklist {
|
||||
// Version older than current major release.
|
||||
if ( self::VERSION_MAIN > self::$options['version'] ) {
|
||||
// Merge default options with current config, assuming only additive changes.
|
||||
$options = array_merge_recursive( self::default_options(), self::$options );
|
||||
$options = array_replace_recursive( self::default_options(), self::$options );
|
||||
$options['version'] = self::VERSION_MAIN;
|
||||
if ( self::$multisite ) {
|
||||
update_site_option( 'statify-blacklist', $options );
|
||||
|
Loading…
x
Reference in New Issue
Block a user