diff --git a/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php b/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php index c1e62b340e..9894a729d5 100644 --- a/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php +++ b/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php @@ -62,7 +62,7 @@ public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = public static function setSettingsOnRequest(Request $request, Settings $settings) { // Initialize proxy settings. if ($settings->get('reverse_proxy', FALSE)) { - if (TRUE === func_get_arg(3)) { + if (3 === func_num_args() && TRUE === func_get_arg(3)) { @trigger_error('The "' . __NAMESPACE__ . '\\' . __CLASS__ . '" class has been deprecated in Drupal 8.6.1 and will be removed before Drupal 9.0.0. Use the new configuration file "sites/reverse_proxy_settings.php" instead. See https://www.drupal.org/project/drupal/issues/2998728.', E_USER_DEPRECATED); }