WordPress.org

Make WordPress Core

Ticket #6821: 6821.fix-strict-standards.diff

File 6821.fix-strict-standards.diff, 2.4 KB (added by markoheijnen, 7 years ago)
  • wp-includes/class-wp-image-editor-gd.php

    diff --git wp-admin/includes/image-edit.php wp-admin/includes/image-edit.php
    index f390b5e..0b06926 100644
    class WP_Image_Editor_GD extends WP_Image_Editor { 
    3232         *
    3333         * @return boolean
    3434         */
    35         public static function test() {
     35        public function test() {
    3636                if ( ! extension_loaded('gd') || ! function_exists('gd_info') )
    3737                        return false;
    3838
    class WP_Image_Editor_GD extends WP_Image_Editor { 
    9999         * @param string $mime_type
    100100         * @return boolean
    101101         */
    102         public static function supports_mime_type( $mime_type ) {
     102        public function supports_mime_type( $mime_type ) {
    103103                $allowed_mime_types = array( 'image/gif', 'image/png', 'image/jpeg' );
    104104
    105105                return in_array( $mime_type, $allowed_mime_types );
  • 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 3e35775..7954206 100644
    class WP_Image_Editor_Imagick extends WP_Image_Editor { 
    3333         *
    3434         * @return boolean
    3535         */
    36         public static function test() {
     36        public function test() {
    3737                if ( ! extension_loaded( 'imagick' ) )
    3838                        return false;
    3939
    class WP_Image_Editor_Imagick extends WP_Image_Editor { 
    143143         * @param string $mime_type
    144144         * @return boolean
    145145         */
    146         public static function supports_mime_type( $mime_type ) {
     146        public function supports_mime_type( $mime_type ) {
    147147                if ( ! $mime_type )
    148148                        return false;
    149149
  • wp-includes/class-wp-image-editor.php

    diff --git wp-includes/class-wp-image-editor.php wp-includes/class-wp-image-editor.php
    index 27df919..83c6b94 100644
    abstract class WP_Image_Editor { 
    7676                return self::$implementation;
    7777        }
    7878
    79         abstract public static function test(); // returns bool
     79        abstract public function test(); // returns bool
    8080        abstract protected function load(); // returns bool|WP_Error
    81         abstract public static function supports_mime_type( $mime_type ); // returns bool
     81        abstract public function supports_mime_type( $mime_type ); // returns bool
    8282        abstract public function resize( $max_w, $max_h, $crop = false );
    8383        abstract public function multi_resize( $sizes );
    8484        abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false );