1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 15:57:01 +02:00

Fix issue processwire/processwire-issues#556 fix issue when cloning Pagefile that has name ending with "-0".

This commit is contained in:
Ryan Cramer
2018-04-06 05:43:25 -04:00
parent 6dc7a122a6
commit 215348b797

View File

@@ -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 {