• Resolved leedxw

    (@leedxw)


    An unauthorised scan of the site resulted in fatal errors:

    PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string + int in /var/www/html/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/View.php:1349

    I can reproduce this with curl "http://localhost/events/list/?posts_per_page='15"

    I can avoid the fatal error by forcing events_per_page to be an int.

    --- a/src/Tribe/Views/V2/View.php
    +++ b/src/Tribe/Views/V2/View.php
    @@ -1346,7 +1346,7 @@ class View implements View_Interface {
    * @since 5.0.0
    */
    $args = [
    - 'posts_per_page' => $context_arr['events_per_page'] + 1,
    + 'posts_per_page' => (int)$context_arr['events_per_page'] + 1,
    'paged' => max( Arr::get_first_set( array_filter( $context_arr ), [
    'paged',
    'page',
    @@ -1415,7 +1415,7 @@ class View implements View_Interface {
    1
    );

    - return ( $current_page - 1 ) * $context->get( 'events_per_page' );
    + return ( $current_page - 1 ) * (int)$context->get( 'events_per_page' );
    }
    /**

    The logs were from a site running the-events-calendar 6.10.3

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Victor Zarranz

    (@vicskf)

    Hi @leedxw !

    Thanks for taking the time to report this and providing the details about it.

    I’ve been able to replicate the error just like you mention. We’ve logged an internal bug report for this and we’re looking to fix this soon. Once we have a fix, we’ll let you know.

    Internal Ref: TEC-5442

    Plugin Support Darian

    (@d0153)

    Hi @leedxw

    We prioritize bugs by taking into consideration the number of users impacted as well as how the bug impacts one’s ability to run an event/sell tickets. I don’t have a specific timeline as to when this issue will be resolved, but trust that our team is aware. Our team communicates updates and bug fixes in our newsletter and via our changelog. We’ll also update you through this thread once the fix is out.

    I’m happy to help if any other questions are coming up around this topic, otherwise I’ll go ahead and close this ticket.

    Plugin Support Chika Ibeneme

    (@chikaibeneme)

    Hi @leedxw

    With our latest release we’ve made some performance improvements as well as resolve the issue that you had previously with the fatal.

    We ask that you upgrade to the latest plugin versions in order to take advantage of the performance improvements that we’ve made. As always, we recommend testing out the updates in a staging version of your site to ensure stability before deploying.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Bad request args trigger fatal error’ is closed to new replies.