[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] ) ) {
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[PATCH] Undefined offset error’ is closed to new replies.