Skip to content

Commit

Permalink
Allow null value in pre update filter
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Sep 18, 2023
1 parent b34ad58 commit dd1d403
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ public function __construct() {
*
* @param mixed $new_value The new value.
* @param mixed $old_value The old value.
*
* @return array|null
*/
public function pre_update_option( $new_value, $old_value ): array {
public function pre_update_option( $new_value, $old_value ): ?array {

if ( ! is_array( $new_value ) ) {
return $new_value;
Expand Down

0 comments on commit dd1d403

Please sign in to comment.