• Sometimes we have such logs:

    [09-Jun-2020 17:59:59 UTC] PHP Warning: array_multisort(): Array sizes are inconsistent in /wordpress/wp-content/plugins/woo-added-to-cart-notification/index.php on line 326

    It happens there:

    function wooac_get_product() {
      $items   = WC()->cart->get_cart();
      $return_html = '<div class="wooac-popup mfp-with-anim">';
    
      if ( count( $items ) > 0 ) {
        array_multisort( array_column( $items, 'wooac_time' ), SORT_ASC, $items );
        $wooac_product = end( $items )['data'];
      ...

    Could you look at it?

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

    (@krut1)

    I suspect that it happens when you activate the plugin and someone had something in the shopping cart beforehand.

    P.S. We use your plugin in Multisite for some blogs.

    Plugin Author WPClever

    (@wpclever)

    Hi @krut1

    Thank you for informing us of this issue!
    We’ve fixed this issue in the latest version 1.2.6 ??

    Thread Starter krut1

    (@krut1)

    Thanks a lot. We will update your plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Warning: array_multisort(): Array sizes are inconsistent’ is closed to new replies.