Title: Divide nay Zero Error
Last modified: February 16, 2026

---

# Divide nay Zero Error

 *  [mattw2711](https://wordpress.org/support/users/mattw2711/)
 * (@mattw2711)
 * [2 months ago](https://wordpress.org/support/topic/divide-nay-zero-error/)
 *     ```wp-block-code
       My site throws a divide by zero critical error. Here is the full log. I could fix it manually by changing the code, but if cache gets cleared this has to be redone function mesmerize_woocommerce_cols_css($sel, $cols){    $size = (100 / intval($cols));    return "" .           "$sel {" .           "-webkit-flex-basis: $size%;" .           "-moz-flex-basis: $size%;" .           "-ms-flex-preferred-size: $size%;" .           "flex-basis: $size%;" .           "max-width: $size%;" .           "}";}
       ```
   

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

 *  [cristianbarbu](https://wordpress.org/support/users/cristianbarbu/)
 * (@cristianbarbu)
 * [2 months ago](https://wordpress.org/support/topic/divide-nay-zero-error/#post-18824355)
 * Hi,
 * Please replace:
 *  $size = (100 / intval($cols)); with: $int_cols = intval($cols); $size = !is_nan(
   $int_cols) && $int_cols > 0 ? 100 / $int_cols : 50;
 * A fix for this will be included in the next Mesmerize theme update. Thank you!
 *  Thread Starter [mattw2711](https://wordpress.org/support/users/mattw2711/)
 * (@mattw2711)
 * [2 months ago](https://wordpress.org/support/topic/divide-nay-zero-error/#post-18824544)
 * Thanks. This has fixed the site, but when I try customise the mesmerize theme
   with the customiser I still get a fatal error. Should the manual fix also have
   fixed that, or is there another known issue with it?
 *  [cristianbarbu](https://wordpress.org/support/users/cristianbarbu/)
 * (@cristianbarbu)
 * [2 months ago](https://wordpress.org/support/topic/divide-nay-zero-error/#post-18824653)
 * Hi,
 * Could you please let me know what error is currently appearing?
 * It would also help a lot if you could:
    - Check the error log on your hosting server
    - Or enable `WP_DEBUG` in WordPress and share the exact error message that shows
      up
 * This will allow to better understand what’s causing the issue and fix it faster.
 *  Thread Starter [mattw2711](https://wordpress.org/support/users/mattw2711/)
 * (@mattw2711)
 * [1 month, 2 weeks ago](https://wordpress.org/support/topic/divide-nay-zero-error/#post-18839936)
 * Hey sorry for the late reply. 
   I do not have server side access, only wordpress.
   I see the below when I navigate to the customiser and the following error in 
   WooCommerce logs
 * { “error”: { “type”: 1, “file”: “/home/jpflower/public_html/wp-includes/functions.
   php”, “line”: 655 }, “remote-logging”: true, “backtrace”: [ { “file”: “/home/
   jpflower/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.
   php”, “line”: 459, “function”: “critical”, “class”: “WC_Logger”, “type”: “->”},{“
   function”: “log_errors”, “class”: “WooCommerce”, “type”: “->” } ] }
 * ![](https://wordpress.org/73c891bc-b3cd-42bc-a951-775be9ce59ec)

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdivide-nay-zero-error%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/mesmerize/1.6.184/screenshot.jpg)
 * Mesmerize
 * [Support Threads](https://wordpress.org/support/theme/mesmerize/)
 * [Active Topics](https://wordpress.org/support/theme/mesmerize/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/mesmerize/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/mesmerize/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [mattw2711](https://wordpress.org/support/users/mattw2711/)
 * Last activity: [1 month, 2 weeks ago](https://wordpress.org/support/topic/divide-nay-zero-error/#post-18839936)
 * Status: not resolved