diff --git a/php/get.php b/php/get.php index d2a9584..4b573d3 100644 --- a/php/get.php +++ b/php/get.php @@ -86,8 +86,9 @@ function create_thumbnail(string $category, string $file): string | null { log_print("generating thumbnail for $original_file"); $output = shell_exec(THUMBNAIL_SCRIPT." '$original_file' '$thumbnail_file' 2>&1"); if ($output) log_print($output); - if ($output === false) { + if (substr_count(strtolower((string) $output), "error")) { log_error("Thumbnail failed"); + log_print(ROOT_URL.IMG_DIR.$path); return ROOT_URL.IMG_DIR.$path; }