fix!
This commit is contained in:
@@ -11,11 +11,12 @@ foreach (scandir('./images') as $inode) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$file_name = basename($inode);
|
$file_name = basename($inode);
|
||||||
|
$image_path = "./images/$file_name";
|
||||||
$thumbnail_path = "./images/thumbnails/$file_name";
|
$thumbnail_path = "./images/thumbnails/$file_name";
|
||||||
|
|
||||||
if ( ! file_exists($thumbnail_path)) {
|
if ( ! file_exists($thumbnail_path)) {
|
||||||
$image_bytes = file_get_contents("./images/$file_name");
|
$image_bytes = file_get_contents($image_path);
|
||||||
|
|
||||||
if ( ! $image_bytes) {
|
if ( ! $image_bytes) {
|
||||||
echo "Warning: couldn't get contents of file $file_name\n";
|
echo "Warning: couldn't get contents of file $file_name\n";
|
||||||
@@ -66,7 +67,7 @@ foreach (scandir('./images') as $inode) {
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
',
|
',
|
||||||
$inode,
|
$image_path,
|
||||||
$thumbnail_path,
|
$thumbnail_path,
|
||||||
$alt_text ?: ''
|
$alt_text ?: ''
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user