Bug in file-away/lib/inc/inc.thumbnails.php
-
File Away Version: 3.9.6.1
A bug causes thumbnail generation to fail when filename includes spaces. This can normally be circumvented by e.g. replacing space with underscore. However, when using customdata, the plugin inserts space on its own between the filename and the brackets.
I fixed the bug by altering lines 92-94 as follows:
if($thumbsize == 'large') exec("convert -define jpeg:size=180x180 \"{$pdfpath}[0]\" -colorspace RGB -thumbnail 180x180 -gravity center -crop 180x180+0+0 +repage \"{$thumbpath}\""); elseif($thumbsize == 'medium') exec("convert -define jpeg:size=120x120 \"{$pdfpath}[0]\" -colorspace RGB -thumbnail 120x120 -gravity center -crop 120x120+0+0 +repage \"{$thumbpath}\""); else exec("convert -define jpeg:size=60x60 \"{$pdfpath}[0]\" -colorspace RGB -thumbnail 60x60 -gravity center -crop 60x60+0+0 +repage \"{$thumbpath}\"");
On a sidenote, the error message on line 889 in file-away/lib/cls/class.fileaway_management.php is not really helpful:
$response = is_file($filename) ? $link : "Error";
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Bug in file-away/lib/inc/inc.thumbnails.php’ is closed to new replies.