Skip to content
Snippets Groups Projects
Commit 7354e62e authored by Maja Górecka-Wolniewicz's avatar Maja Górecka-Wolniewicz
Browse files

fixed logo handling

parent 6e71f07f
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,12 @@ foreach ($_POST as $k=>$v) { ...@@ -67,7 +67,12 @@ foreach ($_POST as $k=>$v) {
fclose($fp); fclose($fp);
if ($suffix == 'svg') { if ($suffix == 'svg') {
$f = fopen($fileName, 'r'); $f = fopen($fileName, 'r');
$imageData = fread($f, filesize($fileName)); if ($f && filesize($fileName) > 0) {
$imageData = fread($f, filesize($fileName));
} else {
$imageData = "";
$result[] = 'ERROR: Could not download logo';
}
} }
} else { } else {
$fileName = '/tmp/testlogo'.bin2hex(openssl_random_pseudo_bytes(10)); $fileName = '/tmp/testlogo'.bin2hex(openssl_random_pseudo_bytes(10));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment