Title: [PATCH] Undefined offset error
Last modified: August 21, 2016

---

# [PATCH] Undefined offset error

 *  [flynsarmy](https://wordpress.org/support/users/flynsarmy/)
 * (@flynsarmy)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/patch-undefined-offset-error/)
 * If you create a new post with WP_DEBUG turned on and don’t enter any map info,
   just post info, you get the following warning:
 * > Notice: Undefined offset: 1 in /Applications/MAMP/htdocs/work/qpsmedia/regionblogs/
   > wp-content/plugins/wp-geo/includes/wp-geo.php on line 666
 * The line in question is
 *     ```
       if ( wpgeo_is_valid_geo_coord( $new_mapcentre[0], $new_mapcentre[1] ) ) {
       ```
   
 * Simply change it to
 *     ```
       if ( isset($new_mapcentre[0]) && isset($new_mapcentre[1]) && wpgeo_is_valid_geo_coord( $new_mapcentre[0], $new_mapcentre[1] ) ) {
       ```
   
 * [http://wordpress.org/extend/plugins/wp-geo/](http://wordpress.org/extend/plugins/wp-geo/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Ben Huson](https://wordpress.org/support/users/husobj/)
 * (@husobj)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/patch-undefined-offset-error/#post-3640573)
 * Thanks – is that in the current latest version of the plugin?
 * I’m working on a complete overhaul of the plugin to support Google Maps v3 as
   Google Maps v2 will cease to work very soon.
 * I would very much appreciate it if you are able to test the development version
   which you can [download here](https://github.com/benhuson/WP-Geo/tree/3.2.dev).
   Any feedback would be gratefully received.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘[PATCH] Undefined offset error’ is closed to new replies.

 * ![](https://ps.w.org/wp-geo/assets/icon-256x256.png?rev=993625)
 * [WP Geo](https://wordpress.org/plugins/wp-geo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-geo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-geo/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-geo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-geo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-geo/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ben Huson](https://wordpress.org/support/users/husobj/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/patch-undefined-offset-error/#post-3640573)
 * Status: not a support question