Support » Plugin: WP Retina 2x » undefined constant 'sizes' bugfix

  • Resolved Brayyy


    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jordy Meow


    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!

    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.

    Plugin Author Jordy Meow


    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).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘undefined constant 'sizes' bugfix’ is closed to new replies.