WordPress.org

Support

Support » Plugins and Hacks » WP Geo » [PATCH] Undefined offset error

[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/

Viewing 1 replies (of 1 total)
  • Plugin Author Ben Huson

    @husobj

    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. Any feedback would be gratefully received.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘[PATCH] Undefined offset error’ is closed to new replies.
Skip to toolbar