Skip to content

Commit 9eabef3

Browse files
committed
fixed best image recovery
1 parent 7c441fd commit 9eabef3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Adapters/Adapter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,20 +356,20 @@ public function getImages()
356356
public function getImage()
357357
{
358358
if ($this->config['getBiggerImage']) {
359-
$images = $this->images;
359+
$allImages = $this->images;
360360

361-
if (empty($images)) {
361+
if (empty($allImages)) {
362362
return;
363363
}
364364

365-
$images = [$images];
365+
$allImages = [$allImages];
366366
} else {
367-
$images = Utils::sortByProviders($this->images);
367+
$allImages = Utils::sortByProviders($this->images);
368368
}
369369

370-
foreach ($images as $image) {
371-
if (($key = Utils::getBiggerValue($image, true)) !== null) {
372-
$image = $this->images[$key];
370+
foreach ($allImages as $images) {
371+
if (($key = Utils::getBiggerValue($images, true)) !== null) {
372+
$image = $images[$key];
373373

374374
if (($image['width'] >= $this->config['minImageWidth']) && ($image['height'] >= $this->config['minImageHeight'])) {
375375
return $image['value'];

0 commit comments

Comments
 (0)