correctly log errors when external imagick fails (merge from trunk)

git-svn-id: http://piwigo.org/svn/branches/2.4@16077 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2012-06-27 04:20:29 +00:00
parent 9f809077e0
commit e1794bbb66

View File

@@ -622,13 +622,15 @@ class image_ext_imagick implements imageInterface
}
$dest = pathinfo($destination_filepath);
$exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'"';
$exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'" 2>&1';
@exec($exec, $returnarray);
ilog($exec);
if (is_array($returnarray) && (count($returnarray)>0) )
{
ilog('ERROR', $returnarray);
foreach($returnarray as $line)
trigger_error($line, E_USER_WARNING);
}
return is_array($returnarray);
}