1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-14 02:34:24 +02:00

Fix php notice in new PageimageVariations.php class

This commit is contained in:
Ryan Cramer
2019-08-04 11:18:06 -04:00
parent 918b894d82
commit e160920984

View File

@@ -316,7 +316,7 @@ class PageimageVariations extends Wire implements \IteratorAggregate, \Countable
$infos = array();
$count = 0;
if(!$options['info'] && $options['count']) {
if(!$options['info'] && !$options['count']) {
$variations = $this->wire(new Pageimages($this->pagefiles->page));
}
@@ -395,7 +395,7 @@ class PageimageVariations extends Wire implements \IteratorAggregate, \Countable
$pageimage->setOriginal($this->pageimage);
if($options['verbose'] === 1) {
$info['pageimage'] = $pageimage;
} else {
} else if($variations) {
$variations->add($pageimage);
}
}