From e36463bd9327aa8b375abe5472a506201224a979 Mon Sep 17 00:00:00 2001 From: Enrico Battocchi Date: Fri, 17 Feb 2023 00:31:33 +0100 Subject: [PATCH] Add default value when retrieving option --- admin-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-functions.php b/admin-functions.php index 5d365af51..04fc2c3cd 100644 --- a/admin-functions.php +++ b/admin-functions.php @@ -293,7 +293,7 @@ function duplicate_post_copy_post_taxonomies( $new_id, $post ) { $post_taxonomies[] = 'post_format'; } - $taxonomies_blacklist = get_option( 'duplicate_post_taxonomies_blacklist' ); + $taxonomies_blacklist = get_option( 'duplicate_post_taxonomies_blacklist', [] ); if ( empty( $taxonomies_blacklist ) ) { $taxonomies_blacklist = []; }