WordPress.org

Make WordPress Core

Ticket #22699: 22699.diff

File 22699.diff, 752 bytes (added by DH-Shredder, 2 years ago)
  • wp-includes/class-wp-image-editor-imagick.php

    diff --git wp-includes/class-wp-image-editor-imagick.php wp-includes/class-wp-image-editor-imagick.php
    index 03485b5..02dfe03 100644
    class WP_Image_Editor_Imagick extends WP_Image_Editor { 
    119119                if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) ) 
    120120                        return new WP_Error( 'error_loading_image', __('File doesn’t exist?'), $this->file ); 
    121121 
     122                // Even though Imagick uses less PHP memory than GD, set higher limit for users that have low PHP.ini limits 
     123                @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) ); 
     124 
    122125                try { 
    123126                        $this->image = new Imagick( $this->file ); 
    124127