sruupl / batflat

Lightweight, fast and easy CMS for free. Bootstrap ready. https://batflat.org
MIT License
134 stars 54 forks source link

No fallback in Gallery for thumbnail if $width < 150 px #11

Closed ghost closed 4 years ago

ghost commented 6 years ago

If image uploaded to Gallery will have smaller width than 150 px - there is no fallback, so there will be no thumbnail and thus no image preview in Admin.

This will also generate: Notice: Undefined index: xs in C:\xampp\htdocs\batflat\inc\modules\galleries\Admin.php on line 133

Basic workaround (it will treat image itself as thumbnail):

 else
 {
    $src[$key] = str_replace(BASE_DIR.'/', null, $imgPath);
 }
michu2k commented 4 years ago

Fixed