Title: PHP Warning: array_multisort(): Array sizes are inconsistent
Last modified: June 10, 2020

---

# PHP Warning: array_multisort(): Array sizes are inconsistent

 *  [krut1](https://wordpress.org/support/users/krut1/)
 * (@krut1)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_multisort-array-sizes-are-inconsistent/)
 * 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](https://wordpress.org/support/users/krut1/)
 * (@krut1)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_multisort-array-sizes-are-inconsistent/#post-12964711)
 * 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](https://wordpress.org/support/users/wpclever/)
 * (@wpclever)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_multisort-array-sizes-are-inconsistent/#post-12969967)
 * Hi [@krut1](https://wordpress.org/support/users/krut1/)
 * Thank you for informing us of this issue!
    We’ve fixed this issue in the latest
   version 1.2.6 🙂
 *  Thread Starter [krut1](https://wordpress.org/support/users/krut1/)
 * (@krut1)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_multisort-array-sizes-are-inconsistent/#post-12983999)
 * 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.

 * ![](https://ps.w.org/woo-added-to-cart-notification/assets/icon-128x128.png?rev
   =2527544)
 * [WPC Added To Cart Notification for WooCommerce](https://wordpress.org/plugins/woo-added-to-cart-notification/)
 * [Support Threads](https://wordpress.org/support/plugin/woo-added-to-cart-notification/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-added-to-cart-notification/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-added-to-cart-notification/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-added-to-cart-notification/reviews/)

## Tags

 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 3 replies
 * 2 participants
 * Last reply from: [krut1](https://wordpress.org/support/users/krut1/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/php-warning-array_multisort-array-sizes-are-inconsistent/#post-12983999)
 * Status: not resolved