mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 08:44:46 +02:00
Fix issue processwire/processwire-issues#556 fix issue when cloning Pagefile that has name ending with "-0".
This commit is contained in:
@@ -491,6 +491,7 @@ class Pagefiles extends WireArray implements PageFieldValueInterface {
|
|||||||
if($n && preg_match('/^(.+?)-(\d+)$/', $parts[0], $matches)) {
|
if($n && preg_match('/^(.+?)-(\d+)$/', $parts[0], $matches)) {
|
||||||
$parts[0] = $matches[1];
|
$parts[0] = $matches[1];
|
||||||
$n = (int) $matches[2];
|
$n = (int) $matches[2];
|
||||||
|
if(!$n) $n = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
Reference in New Issue
Block a user