WordPress 4.1.4-scripts
[autoinstalls/wordpress.git] / wp-includes / class-wp-image-editor-imagick.php
index 4ebed4bae76d8870c6b847e30de6b46bbe955052..843b85c541076983ca21f65c938c60929acbb5bc 100644 (file)
  * @uses WP_Image_Editor Extends class
  */
 class WP_Image_Editor_Imagick extends WP_Image_Editor {
+       /**
+        * @var Imagick
+        */
+       protected $image; // Imagick Object
 
-       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();
@@ -140,10 +142,11 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
                }
 
                $updated_size = $this->update_size();
-               if ( is_wp_error( $updated_size ) )
-                               return $updated_size;
+               if ( is_wp_error( $updated_size ) ) {
+                       return $updated_size;
+               }
 
-               return $this->set_quality( $this->quality );
+               return $this->set_quality();
        }
 
        /**
@@ -160,7 +163,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 {