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) {
fclose($fp);
if ($suffix == 'svg') {
$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 {
$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