• When using the shortcode [event post_id”#”] and there is no event found matching the conditions a get PHP notice:

    Notice: Undefined variable: return in /wp-content/plugins/events-manager/em-shortcode.php on line 103

    The return variable in em_get_event_shortcode() (and other functions) is defined in the if/else statements. If no results are found an undefined variable gets referred.

    https://www.ads-software.com/plugins/events-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    have you tried something like this [event post_id=”X”] where is the event post id instead of [event post_id”#”] ?

    Thread Starter d.schoorisse

    (@dschoorisse)

    HI Angelo,

    I have made a small error writing it down on the forums. I have used the short code like you have in your post.

    I think the problem is the declaration of the $results variable within the if/else statements. However, it’s not a big problem (only a notice).

    Hiya,

    This does appear to be a minor bug with the function you mention not accounting for a fallback position.

    I’ll pass this onto Marcus for a fix.

    Cheers,
    Phil

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Small bug(?) in em-shortcode.php’ is closed to new replies.