Fix exif_read_data fatal error
This commit is contained in:
parent
655574262b
commit
e1cf93d9a9
1 changed files with 2 additions and 2 deletions
|
|
@ -323,7 +323,7 @@ function dolRotateImage($file_path)
|
|||
function correctExifImageOrientation($fileSource, $fileDest, $quality = 95)
|
||||
{
|
||||
if (function_exists('exif_read_data')) {
|
||||
$exif = exif_read_data($fileSource);
|
||||
$exif = @exif_read_data($fileSource);
|
||||
if ($exif && isset($exif['Orientation'])) {
|
||||
$infoImg = getimagesize($fileSource); // Get image infos
|
||||
|
||||
|
|
@ -456,7 +456,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
|
|||
|
||||
$ort = false;
|
||||
if (function_exists('exif_read_data')) {
|
||||
$exif = exif_read_data($filetoread);
|
||||
$exif = @exif_read_data($filetoread);
|
||||
if ($exif && !empty($exif['Orientation'])) {
|
||||
$ort = $exif['Orientation'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue