1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +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 // populate $base with $name sans ImageSizer info and extension
$name = basename($name); $name = basename($name);
$pos = strpos($name, '.'); $pos = strpos($name, '.');
$base = substr($name, 0, $pos); $base = ($pos ? substr($name, 0, $pos) : null);
foreach($this as $pagefile) { 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? // they start the same, is it a variation?
if(!$pagefile->isVariation($name)) continue; if(!$pagefile->isVariation($name)) continue;
// if we are here we found a variation // if we are here we found a variation