1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 00:06:55 +02:00
This commit is contained in:
Ryan Cramer
2022-05-10 09:46:45 -04:00
parent 1523eba59c
commit 5a63b7eed7

View File

@@ -84,10 +84,10 @@ class Pageimages extends Pagefiles {
// populate $base with $name sans ImageSizer info and extension
$name = basename($name);
$pos = strpos($name, '.');
$base = substr($name, 0, $pos);
$base = ($pos ? substr($name, 0, $pos) : null);
foreach($this as $pagefile) {
if(strpos($pagefile->basename, $base) !== 0) continue;
if($base !== null && strpos($pagefile->basename, $base) !== 0) continue;
// they start the same, is it a variation?
if(!$pagefile->isVariation($name)) continue;
// if we are here we found a variation