Help Desk

Undefined variable: args in advanced-functions/event.php on line 84

  • Posts: 1 Topics: 1
    | Permalink

    Hi support,

    I believe I found a small bug. If there is a better place to submit a bug please let me know. I couldn’t find where the proper place to do that is, so I’m doing it here.

    When running tribe_delete_event() you get the following error.
    PHP Notice: Undefined variable: args in /plugins/the-events-calendar/public/advanced-functions/event.php on line 84

    On line 83-86 in event.php there is the following…

    function tribe_delete_event($postId, $force_delete = false) {
    $success = TribeEventsAPI::deleteEvent($postId, $args);
    return $success;
    }

    I believe $args should be $force_delete, yes?

    Looking at lines 63-65 in tribe-event-api.class.php we have the following…

    public static function deleteEvent($eventId, $force_delete = false) {
    return wp_delete_post($eventId, $force_delete);
    }

    If this is not a bug and I’m just doing something wrong, please let me know what additional info you need.

    Many thanks!
    -Tim

    Posts: 3519 Answers: 115
    | Permalink

    Tim,
    Thanks for getting in touch! We definitely haven’t seen any other reports of this, but I’ll log this as a ticket for our developers to investigate further and let you know what I hear back from them. Thanks! 🙂

    -Casey-

    Posts: 3519 Answers: 115
    | Permalink
    Correct Answer

    Tim,
    Good catch! I just heard back from one of our developers, and this was definitely a bug. He’s fixed it in our current code base, and the fix should go out with version 3.7. Thanks again for reporting it, and just let me know if you have further questions. 😀

    -Casey-

    Posts: 1 Topics: 1
    | Permalink

    Awesome, thanks Casey. Happy to help!

    All the best,
    -Tim

    Posts: 3519 Answers: 115
    | Permalink

    Thanks for confirming that this got you sorted. Since it looks like you’re all set, I’m going to mark this thread “Answered” and close it out.

    By the way, if you have a minute or two, we would love it if you’d write a few words for us here: http://m.tri.be/lo

    Thanks in advance. 🙂

    Cheers,
    Casey

    Posts: 3443 Topics: 13 Answers: 199
    | Permalink

    Hi there,

    I just wanted to drop in and update you on the status of this issue. We are working on the upcoming 3.7 release and are happy to say that a fix for this issue will be included. Please keep an eye on your Updates and Plugins pages for an update prompt. If you have any trouble or continue to see this issue after updating, please start a new thread and we can assist you from there. Thank you for your patience while we worked on this issue.

    Best,
    Leah