Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author apollo13themes

    (@apollo13themes)

    Can you list here what are the plugins you have and the PHP version?

    Thread Starter mugia

    (@mugia)

    I have a lot of plugin but according to error message it should be something linked to woocommerce. This is the list about WooCommerce and Rife Free:

    • Rife Elementor Extensions & Templates
    • Ni WooCommerce Payment Gateway Charges
    • Review Slider for WooCommerce
    • WooCommerce
    • WooCommerce Weight Based Shipping
    • zahls.ch Credit Cards, PostFinance and TWINT for WooCommerce

    PHP version is 8.3

    • This reply was modified 9 months ago by mugia.
    Theme Author apollo13themes

    (@apollo13themes)

    Please try enabling WooCommerce and disable these plugins:

    • Ni WooCommerce Payment Gateway Charges
    • Review Slider for WooCommerce
    • WooCommerce Weight Based Shipping
    • zahls.ch Credit Cards, PostFinance and TWINT for WooCommerce

    This way you will see what is causing the problem.

    Technically the error you’re getting is caused by either ‘paged’ or ‘posts_per_page’ query vars are empty, which is weird.

    Thread Starter mugia

    (@mugia)

    I’ve tried but still have exactly the same error.

    Thread Starter mugia

    (@mugia)

    I think I solved the bug. I’m not sure about this code want to do but casting the null value (from $wp_query->get( ‘posts_per_page’ )) to (int) it can execute the Multiplication Operator.

    $last = min( $total, (int)$wp_query->get( 'posts_per_page' ) * $paged );

    Theme Author apollo13themes

    (@apollo13themes)

    Yes, this will be fixed in upcoming version, but still ‘posts_per_page’ should have a value, something (some plugin or custom code in your theme) is removing this var.

    https://developer.www.ads-software.com/reference/classes/wp_query/get/ returns given var or empty string.

    We’ll make this code more resiliant in upcoming version.

    Thread Starter mugia

    (@mugia)

    I suppose that the return isn’t null but empty string. As defined in php doc casting null or empty string returns 0. I think mine could be a good solution.

    Now I modified the code of woocommerce.php. When an update of the should be available this file will be overwritten? Or need I to do something?

    • This reply was modified 8 months, 4 weeks ago by mugia.
    Theme Author apollo13themes

    (@apollo13themes)

    Nothing else will be required to keep this error away.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Uncaught TypeError: Unsupported operand types: int * string’ is closed to new replies.