diff --git a/core/includes/install.inc b/core/includes/install.inc
index 70c82b4c853f1e87704a1cabe3be75fb54ae14e7..5ed430342a36c5b787a08a8994624dd2e4b0f751 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -1105,7 +1105,7 @@ function drupal_check_module($module) {
  *   The info array.
  */
 function install_profile_info($profile, $langcode = 'en') {
-  $cache = &drupal_static(__FUNCTION__, []);
+  static $cache = [];
 
   if (!isset($cache[$profile][$langcode])) {
     // Set defaults for module info.