Merge pull request #322 from HungryFeline/patch-3

use upload_tmp_dir as temp place, see #297
This commit is contained in:
Shish 2013-07-21 01:48:41 -07:00
commit 097655e7f7

View File

@ -179,7 +179,7 @@ class RotateImage extends Extension {
$image_rotated = imagerotate($image, $deg, 0); $image_rotated = imagerotate($image, $deg, 0);
/* Temp storage while we rotate */ /* Temp storage while we rotate */
$tmp_filename = tempnam("/tmp", 'shimmie_rotate'); $tmp_filename = tempnam(ini_get('upload_tmp_dir'), 'shimmie_rotate');
if (empty($tmp_filename)) { if (empty($tmp_filename)) {
throw new ImageRotateException("Unable to save temporary image file."); throw new ImageRotateException("Unable to save temporary image file.");
} }