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

  1. Brayyy
    Posted 3 years 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.


  2. Jordy Meow
    Plugin Author

    Posted 3 years 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
    Posted 3 years 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 ) {

    Thanks! Your plugin has been very helpful.

  4. Jordy Meow
    Plugin Author

    Posted 3 years 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

  • WP Retina 2x
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic