fix config
authorMichael Wallner <mike@php.net>
Sat, 12 Feb 2022 13:18:20 +0000 (14:18 +0100)
committerMichael Wallner <mike@php.net>
Sat, 12 Feb 2022 13:18:20 +0000 (14:18 +0100)
mdref/Repo.php

index 80af9078dbf3b9a43945187e316b9495c1fdb376..8556e498fb2fa8b171c253f012094f737864d126 100644 (file)
@@ -65,6 +65,7 @@ class Repo implements IteratorAggregate {
                        throw new InvalidArgumentException("Not a reference, could not find any '{mdref.*,*.mdref}': '$path'");
                }
 
+               $this->path = realpath($path);
                foreach ($glob as $mdref) {
                        switch (pathinfo($mdref, PATHINFO_EXTENSION)) {
                                case "mdref":
@@ -82,11 +83,10 @@ class Repo implements IteratorAggregate {
                                                        $this->$key = $json->$key;
                                                }
                                        }
-                                       break;
+                                       break 2;
                                default:
                                        throw InvalidArgumentException("Unknown $path");
                        }
-                       $this->path = realpath($path);
                }
        }