Skip to content

Commit fed5eb4

Browse files
committed
Read the image file after setting the resource limit constraints.
1 parent c11278a commit fed5eb4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/php/UploadHandler.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* jQuery File Upload Plugin PHP Class 6.11.0
3+
* jQuery File Upload Plugin PHP Class 6.11.1
44
* https://github.com/blueimp/jQuery-File-Upload
55
*
66
* Copyright 2010, Sebastian Tschan
@@ -689,12 +689,13 @@ protected function gd_orient_image($file_path) {
689689
protected function imagick_get_image_object($file_path, $no_cache = false) {
690690
if (empty($this->image_objects[$file_path]) || $no_cache) {
691691
$this->imagick_destroy_image_object($file_path);
692-
$image = new Imagick($file_path);
692+
$image = new Imagick();
693693
if (!empty($this->options['imagick_resource_limits'])) {
694694
foreach ($this->options['imagick_resource_limits'] as $type => $limit) {
695695
$image->setResourceLimit($type, $limit);
696696
}
697697
}
698+
$image->readImage($file_path);
698699
$this->image_objects[$file_path] = $image;
699700
}
700701
return $this->image_objects[$file_path];

0 commit comments

Comments
 (0)