From 0c9e63b7ee49456e0422ec78d26df834ebb82a49 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Tue, 23 Aug 2016 19:17:12 +0200 Subject: [PATCH] Equalized update_options() methods to remove warning --- inc/statifyblacklist.class.php | 3 ++- inc/statifyblacklist_admin.class.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/statifyblacklist.class.php b/inc/statifyblacklist.class.php index ad58dcb..a98b819 100644 --- a/inc/statifyblacklist.class.php +++ b/inc/statifyblacklist.class.php @@ -81,10 +81,11 @@ class StatifyBlacklist { /** * Update options * + * @param $options array New options to save * @since 1.0.0 * @changed 1.1.1 */ - public static function update_options() { + public static function update_options( $options = null ) { self::$_options = wp_parse_args( get_option( 'statify-blacklist' ), array( diff --git a/inc/statifyblacklist_admin.class.php b/inc/statifyblacklist_admin.class.php index 375551b..bb6c2a5 100644 --- a/inc/statifyblacklist_admin.class.php +++ b/inc/statifyblacklist_admin.class.php @@ -12,10 +12,11 @@ class StatifyBlacklist_Admin extends StatifyBlacklist { /** * Update options * + * @param $options array New options to save * @return mixed array of sanitized array on errors, FALSE if there were none * @since 1.1.1 */ - public static function update_options( $options ) { + public static function update_options( $options = null ) { if ( isset( $options ) && current_user_can( 'manage_options' ) ) { /* Sanitize URLs and remove empty inputs */ $givenReferer = $options['referer']; @@ -35,7 +36,7 @@ class StatifyBlacklist_Admin extends StatifyBlacklist { } /* Refresh options */ - parent::update_options(); + parent::update_options( $options ); return false; }