• Resolved webbistro

    (@webbistro)


    Hi,

    I found a bug when a user of my plugin Enhanced Media Library asked for help with our plugins compatibility:

    \meow-gallery\mgl_run.php line 39 is now $images = implode( $atts['include'], ',' );

    It causes issues – empty gallery – when [gallery include='1,2,3'] used. Actually, the error

    Warning: implode(): Invalid arguments passed in /public_html/wp-content/plugins/meow-gallery/mgl_run.php on line 39

    I believe it should be more like it’s in the core:

    https://core.trac.www.ads-software.com/browser/tags/4.9.8/src/wp-includes/media.php#L1637

    include should be used if only ids is not set and it IS already a string, implode is redundant.

    Best,
    -Nadia

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello Nadia,

    Sorry for the late reply, I will ask Jordy to have a look at it !

    Best,
    Thomas

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @webbistro,

    A new version is out, however, it doesn’t include the fix for your issue.

    if ( isset( $atts[‘ids’] ) )
    $images = $atts[‘ids’];
    else if ( isset( $atts[‘include’] ) ) {
    $images = is_array($atts[‘include’]) ? implode( $atts[‘include’], ‘,’ ) : $atts[‘include’];
    }

    Can you check the code above? Would it work for your case?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘A bug found’ is closed to new replies.