Incorrect use of the `{icon}` helper for the `regular` style
authorAlexander Ebert <ebert@woltlab.com>
Wed, 10 Aug 2022 20:08:28 +0000 (22:08 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 12 Aug 2022 19:25:55 +0000 (21:25 +0200)
extra/migrate-fa-v4.php

index ea16b0a9a7f08b37a71bec83daa9bf48f33d8537..b76e0f67a151f6089b5b470da8ebc4939f96f1f7 100644 (file)
@@ -26,6 +26,8 @@ fclose($fp);
 $iconShim = json_decode($json, true);
 
 function replaceTemplates(string $directory): void {
+    global $iconShim;
+
     $knownSizes = [16, 24, 32, 48, 64, 96, 128, 144];
 
     chdir(__DIR__);
@@ -56,6 +58,10 @@ function replaceTemplates(string $directory): void {
                     $type = 'solid';
                 }
 
+                if ($type === 'regular') {
+                    return "{icon size={$size} name='{$newIconName}'}";
+                }
+
                 return "{icon size={$size} name='{$newIconName}' type='{$type}'}";
             },
             $content,