diff --git a/wire/core/Pagefiles.php b/wire/core/Pagefiles.php index 9bedcf42..2231cf41 100644 --- a/wire/core/Pagefiles.php +++ b/wire/core/Pagefiles.php @@ -491,6 +491,7 @@ class Pagefiles extends WireArray implements PageFieldValueInterface { if($n && preg_match('/^(.+?)-(\d+)$/', $parts[0], $matches)) { $parts[0] = $matches[1]; $n = (int) $matches[2]; + if(!$n) $n = 1; } do {