destroy the JPEGMeta object after use
On windows systems a file can not be deleted while processes still have a handle on them. JPEGMeta seems not to close its file handle correctly. Usually thats not a problem in short lived processes where everything is garbage collected at the end, however within a test request the object may live on a little longer causing problems.
This commit is contained in:
parent
c85f645e12
commit
01c53a6541
|
@ -1014,6 +1014,7 @@ function tpl_img_getTag($tags, $alt = '', $src = null) {
|
|||
if(is_null($meta)) $meta = new JpegMeta($src);
|
||||
if($meta === false) return $alt;
|
||||
$info = cleanText($meta->getField($tags));
|
||||
$meta = null; // garbage collect and close any file handles. See #3404
|
||||
if($info == false) return $alt;
|
||||
return $info;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue