@@ -265,9 +265,9 @@ public static function useLocale(string $locale)
      */
     protected static function ensureIntlExtensionIsInstalled()
     {
-        $caller = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['function'];
-
         if (! extension_loaded('intl')) {
+            $caller = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['function'];
+
             throw new RuntimeException('The "intl" PHP extension is required to use the method: '.$caller);
         }
     }