From: Michael Wallner Date: Sat, 12 Feb 2022 13:18:20 +0000 (+0100) Subject: fix config X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6fb2bcef6982d1125c45f821e84fe45e16192557;p=mdref%2Fmdref fix config --- diff --git a/mdref/Repo.php b/mdref/Repo.php index 80af907..8556e49 100644 --- a/mdref/Repo.php +++ b/mdref/Repo.php @@ -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); } }