Title: Fatal error: Uncaught ArithmeticError
Last modified: March 18, 2018

---

# Fatal error: Uncaught ArithmeticError

 *  Resolved [rjhardaway](https://wordpress.org/support/users/rjhardaway/)
 * (@rjhardaway)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-arithmeticerror/)
 * IP Geo Block got corrupted this morning and I received the following error:
 * Fatal error: Uncaught ArithmeticError: Bit shift by negative number in /home/
   cayuga7/yourny23.org/wp-content/plugins/ip-geo-block/includes/Net/IPv4.php:14
   Stack trace: #0 /home/cayuga7/yourny23.org/wp-content/plugins/ip-geo-block/classes/
   class-ip-geo-block.php(806): Net_IPv4::ipInNetwork(‘67.249.139.82’, ‘120.24.60.0/
   255’) #1 /home/cayuga7/yourny23.org/wp-content/plugins/ip-geo-block/classes/class-
   ip-geo-block.php(831): IP_Geo_Block::check_ips(Array, ‘120.24.60.0/255…’) #2 /
   home/cayuga7/yourny23.org/wp-includes/class-wp-hook.php(286): IP_Geo_Block->check_ips_black(
   Array, Array) #3 /home/cayuga7/yourny23.org/wp-includes/plugin.php(203): WP_Hook-
   >apply_filters(Array, Array) #4 /home/cayuga7/yourny23.org/wp-content/plugins/
   ip-geo-block/classes/class-ip-geo-block.php(466): apply_filters(‘ip-geo-block-
   ad…’, Array, Array) #5 /home/cayuga7/yourny23.org/wp-content/plugins/ip-geo-block/
   classes/class-ip-geo-block.php(630): IP_Geo_Block->validate_ip(‘admin’, Array,
   1) #6 /home/cayuga7/yourny23.org/wp-includes/class-wp-hook.php(2 in /home/cayuga7/
   yourny23.org/wp-content/plugins/ip-geo-block/includes/Net/IPv4.php on line 14
 * This error blocks me from logging in as admin. I tried disabling/deleting IP 
   Geo Block, but when I reinstall and activate it, I get the same error.
 * Any ideas?

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

 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-arithmeticerror/#post-10087779)
 * Hi [@rjhardaway](https://wordpress.org/support/users/rjhardaway/),
 * It might be happened in [Net DNS2 library](https://netdns2.com/).
 * You seem to put ‘120.24.60.0/255’ into Whitelist or Blacklist of extra IP addresses
   prior to country code.
 * Regarding to CIDR of IPv4, the notation is like ‘a.b.c.d/n’ where n = 0 〜 32.
   But you specified n = 255.
 * Check out [IPv4 CIDR blocks](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#IPv4_CIDR_blocks).
 * > when I reinstall and activate it, I get the same error.
 * Yes, it might happen until you remove ‘120.24.60.0/255’ from database.
 * Well…, I made a special version which limit the number ‘n’.
 * Please download “[class-ip-geo-block.php](https://gist.github.com/tokkonopapa/0aacf884de327a931927fe5f7b1267c4)”
   from [here](https://gist.github.com/tokkonopapa/0aacf884de327a931927fe5f7b1267c4/archive/8daeead5041609c7909cd0eef5216ffcf54b1bdb.zip)
   and upload it into your `/wp-content/plugins/ip-geo-block/classes/`.
 * Good luck!
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-arithmeticerror/#post-10087807)
 * By the way, you probably tend to set 120.24.60.0 to 120.24.60.255. In that case,
   the right value should be ‘120.24.60.0/24′.
 * The ‘n’ means the number of bits to mask the whole IP address. And the maximum
   number of bits is 32 bits for IPv4 and 128 bits for IPv6.
 * So ‘a.b.c.d/32′ is equivalent to ‘a.b.c.d’, that’s to say, just one IP address.
 * Please use “[CIDR calculator for IPv4/IPv6](http://www.ipgeoblock.com/changelog/release-3.0.9.html#new-featuer-cidr-calculator)”(
   click the “life buoy” button) built in this plugin!
    -  This reply was modified 8 years, 2 months ago by [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/).
 *  Plugin Author [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * (@tokkonopapa)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-arithmeticerror/#post-10138695)
 * Hi [@rjhardaway](https://wordpress.org/support/users/rjhardaway/),
 * In version 3.0.10.1, your issue should be fixed as the prefix of CIDR will be
   limited to the proper value.
 * I hope you to update the new version.

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

The topic ‘Fatal error: Uncaught ArithmeticError’ is closed to new replies.

 * ![](https://ps.w.org/ip-geo-block/assets/icon-128x128.png?rev=1148568)
 * [IP Geo Block](https://wordpress.org/plugins/ip-geo-block/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ip-geo-block/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ip-geo-block/)
 * [Active Topics](https://wordpress.org/support/plugin/ip-geo-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ip-geo-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ip-geo-block/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 3 replies
 * 2 participants
 * Last reply from: [tokkonopapa](https://wordpress.org/support/users/tokkonopapa/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-arithmeticerror/#post-10138695)
 * Status: resolved