• Kevin Coleman

    (@kevincoleman)


    A WooCommerce checkout triggers a 500 error caused by this plugin as of v5.0. I don’t have access to an older version to do a spot check as to if the error was introduced with v5.0 (at least WPRollback shows no previous versions still published).

    I have a full stack trace, but here’s the error:

    PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * int in .../wp-content/plugins/raffle-ticket-generator/raffle-ticket-generator.php:603

    Since I can’t roll back I’m sunk not using the plugin until this is fixed. The 500 error returns on submitting an order, which blocks users from getting to the order completion page and then tricks them into re-submitting countless orders.

    I’m going to be looking into the code myself to make a patch, but please fix ASAP.

    Update: I patched line 603 by casting (get_post_meta( $item[‘product_id’], ‘_number_field’, true) as an int. So the resulting code is:

    $no_of_tickets = ($item['qty']) * (int) (get_post_meta( $item['product_id'], '_number_field', true ));

    It’s probably better to do an actual type check and then cast if necessary, but this appears to have squashed the bug for the moment.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Kevin Coleman

    (@kevincoleman)

    This appears to still be an active issue, throwing fatals. Anyone manning these tickets?

    Sorry – we did not see this previously. We have released an update to fix the issue that affects our bronze (free) edition. This was not an issue with our other versions.

    Thread Starter Kevin Coleman

    (@kevincoleman)

    Thanks very much! I see it there in the changelog now. I’ll test it out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.