Skip to content

Commit

Permalink
Parameter to sanitize method could be null.
Browse files Browse the repository at this point in the history
  • Loading branch information
derpaschi committed Sep 20, 2024
1 parent be93245 commit 30acf12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/class-wp-widget-disable.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public function disable_dashboard_widgets(): void {
* @param mixed[] $input Sidebar widgets to disable.
* @return mixed[]
*/
public function sanitize_sidebar_widgets( array $input ): array { // phpcs:ignore Squiz.Commenting.FunctionComment.IncorrectTypeHint -- mixed is not a valid type hint in PHP 7.4.
public function sanitize_sidebar_widgets( ?array $input ): array { // phpcs:ignore Squiz.Commenting.FunctionComment.IncorrectTypeHint -- mixed is not a valid type hint in PHP 7.4.
// If there are settings errors the input was already sanitized.
// See https://core.trac.wordpress.org/ticket/21989.
if ( $this->has_settings_errors() ) {
Expand Down Expand Up @@ -501,7 +501,7 @@ public function sanitize_sidebar_widgets( array $input ): array { // phpcs:ignor
* @param mixed[] $input Dashboards widgets to disable.
* @return mixed[]
*/
public function sanitize_dashboard_widgets( array $input ): array { // phpcs:ignore Squiz.Commenting.FunctionComment.IncorrectTypeHint -- mixed is not a valid type hint in PHP 7.4.
public function sanitize_dashboard_widgets( ?array $input ): array { // phpcs:ignore Squiz.Commenting.FunctionComment.IncorrectTypeHint -- mixed is not a valid type hint in PHP 7.4.
// If there are settings errors the input was already sanitized.
// See https://core.trac.wordpress.org/ticket/21989.
if ( $this->has_settings_errors() ) {
Expand Down

0 comments on commit 30acf12

Please sign in to comment.