From 1024e445ffaaca149e64effdeffdec157b0ff3fd Mon Sep 17 00:00:00 2001 From: Robert Vogel <1201528+osnard@users.noreply.github.com> Date: Fri, 28 Jan 2022 18:07:27 +0100 Subject: [PATCH] Fix second param to `preg_match` (#78) Co-authored-by: rvogel --- includes/Parameters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Parameters.php b/includes/Parameters.php index 992cf75..e0d3f90 100644 --- a/includes/Parameters.php +++ b/includes/Parameters.php @@ -407,7 +407,7 @@ class Parameters extends ParametersData { // would throw an error due to a bad regex from user input. // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged - if ( @preg_match( $regex, null ) === false ) { + if ( @preg_match( $regex, '' ) === false ) { // @phan-suppress-previous-line PhanParamSuspiciousOrder, PhanTypeMismatchArgumentInternalProbablyReal return false; }