WordPress.org

Ready to get started?Download WordPress

Forums

WP Retina 2x
[resolved] undefined constant 'sizes' bugfix (4 posts)

  1. Brayyy
    Member
    Posted 1 year ago #

    Hey, I just wanted to let you know that I noticed a bug in wp-retina-2x.php, line 354.

    if ( !sizes || !is_array( $sizes ) )

    should be

    if ( !$sizes || !is_array( $sizes ) )

    It wasn't a big problem, but it was throwing an undefined constant error. This should solve that. Otherwise, love the plugin. Thanks for the hard work.

    http://wordpress.org/extend/plugins/wp-retina-2x/

  2. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    Oh you right! This has been unnoticed for quite a long while... thanks for finding this! I will include the correction in the next update. Thanks a lot!

  3. Brayyy
    Member
    Posted 1 year ago #

    Sure, not a problem. While working on my own plugin, I have PHP outputting every Error, Notice and Warning.

    Additionally, I think the wr2x_vt_resize should be wrapped with a function exists. I wrote scripts that generate multiple posts at once, which would previously fail, since it was already defined.

    if (!function_exists('wr2x_vt_resize')){
      function wr2x_vt_resize( $file_path, $width, $height, $newfile ) {
        ...code...
      }
    }

    Thanks! Your plugin has been very helpful.

  4. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    Okay, super, I did added that check and it will be included in the next version (which will be released at the same time as WP 3.5).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic