diff --git a/src/functions/utils.php b/src/functions/utils.php index 47281299b..000557d24 100644 --- a/src/functions/utils.php +++ b/src/functions/utils.php @@ -160,13 +160,13 @@ function tribe_exit( $status = '' ) { * * @see tec_get_request_var() * - * @param string|array $var The variable to check for. - * @param mixed $default The default value to return if the variable is not set. + * @param string|array $var The variable to check for. + * @param mixed $default_value The default value to return if the variable is not set. * * @return mixed */ - function tribe_get_request_var( $var, $default = null ) { - return tec_get_request_var( $var, $default ); + function tribe_get_request_var( $var, $default_value = null ) { + return tec_get_request_var( $var, $default_value ); } } @@ -187,32 +187,32 @@ function tribe_get_request_var( $var, $default = null ) { * @see Tribe__Utils__Array::get_in_any() * @see tribe_sanitize_deep() * - * @param string|array $var The variable to check for. - * @param mixed $default The default value to return if the variable is not set. + * @param string|array $var The variable to check for. + * @param mixed $default_value The default value to return if the variable is not set. * * @return mixed */ - function tec_get_request_var( $var, $default = null ) { + function tec_get_request_var( $var, $default_value = null ) { $requests = []; // Prevent a slew of warnings every time we call this. if ( isset( $_REQUEST ) ) { - $requests[] = (array) $_REQUEST; + $requests[] = (array) $_REQUEST; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Recommended } if ( isset( $_GET ) ) { - $requests[] = (array) $_GET; + $requests[] = (array) $_GET; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Recommended } if ( isset( $_POST ) ) { - $requests[] = (array) $_POST; + $requests[] = (array) $_POST; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Recommended } if ( empty( $requests ) ) { - return $default; + return $default_value; } - $unsafe = Tribe__Utils__Array::get_in_any( $requests, $var, $default ); + $unsafe = Tribe__Utils__Array::get_in_any( $requests, $var, $default_value ); // Sanitize and return. return tribe_sanitize_deep( $unsafe ); @@ -235,32 +235,32 @@ function tec_get_request_var( $var, $default = null ) { * * @see Tribe__Utils__Array::get_in_any() * - * @param string|array $var The variable to check for. - * @param mixed $default The default value to return if the variable is not set. + * @param string|array $var The variable to check for. + * @param mixed $default_value The default value to return if the variable is not set. * * @return mixed */ - function tec_get_request_var_raw( $var, $default = null ) { + function tec_get_request_var_raw( $var, $default_value = null ) { $requests = []; // Prevent a slew of warnings every time we call this. if ( isset( $_REQUEST ) ) { - $requests[] = (array) $_REQUEST; + $requests[] = (array) $_REQUEST; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Recommended } if ( isset( $_GET ) ) { - $requests[] = (array) $_GET; + $requests[] = (array) $_GET; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Recommended } if ( isset( $_POST ) ) { - $requests[] = (array) $_POST; + $requests[] = (array) $_POST; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Recommended } if ( empty( $requests ) ) { - return $default; + return $default_value; } - $unsafe = Tribe__Utils__Array::get_in_any( $requests, $var, $default ); + $unsafe = Tribe__Utils__Array::get_in_any( $requests, $var, $default_value ); // Return the value as is. return $unsafe;