]> _ Git - fluidbook_tools.git/commitdiff
wip #6533 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 29 Nov 2023 08:01:14 +0000 (09:01 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 29 Nov 2023 08:01:14 +0000 (09:01 +0100)
src/Links/Link.php

index 36965cb5e4912a6dd83b660b2489fa71d2e515dd..089eb3f724d6c7d9c7ed830591d53e0144d0df50 100644 (file)
@@ -467,6 +467,8 @@ class Link
     {
         $this->_init = $init;
 
+        $ignoreExtraKeys = ['type'];
+
         foreach ($init as $k => $v) {
             if ($k == 'extra') {
                 if (Json::isJson($v)) {
@@ -479,7 +481,9 @@ class Link
                 } else if (str_contains($v, '=')) {
                     $extras = self::parseExtras($v);
                     foreach ($extras as $extrak => $extrav) {
-                        $this->$extrak = $extrav;
+                        if (!in_array($extrak, $ignoreExtraKeys)) {
+                            $this->$extrak = $extrav;
+                        }
                     }
                     continue;
                 }