mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-24 19:17:54 +00:00
Throw Exception on cachefile write error
This commit is contained in:
@@ -166,7 +166,9 @@ class QRImage extends QROutputAbstract{
|
||||
|
||||
// if saving to file, append the correct headers
|
||||
if($this->options->cachefile){
|
||||
@file_put_contents($this->options->cachefile, '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' . "\n" . $imageData);
|
||||
if(false === @file_put_contents($this->options->cachefile, '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' . "\n" . $imageData)){
|
||||
throw new QRCodeOutputException('Could not write to cache file.');
|
||||
}
|
||||
}
|
||||
|
||||
if((bool)$this->options->base64){
|
||||
|
||||
Reference in New Issue
Block a user