WordPress 4.0
[autoinstalls/wordpress.git] / wp-includes / class-wp-image-editor-imagick.php
index 4ebed4bae76d8870c6b847e30de6b46bbe955052..8bd6e38861c2ceba374bef8417462fc8ddc83e4c 100644 (file)
@@ -18,7 +18,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
 
        protected $image = null; // Imagick Object
 
-       function __destruct() {
+       public function __destruct() {
                if ( $this->image instanceof Imagick ) {
                        // we don't need the original in memory anymore
                        $this->image->clear();
@@ -143,7 +143,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
                if ( is_wp_error( $updated_size ) )
                                return $updated_size;
 
-               return $this->set_quality( $this->quality );
+               return true;
        }
 
        /**
@@ -160,7 +160,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
                if ( is_wp_error( $quality_result ) ) {
                        return $quality_result;
                } else {
-                       $quality = $this->quality;
+                       $quality = $this->get_quality();
                }
 
                try {