diff --git a/wp-gpx-maps_utils_nggallery.php b/wp-gpx-maps_utils_nggallery.php index 5b88078..014915e 100644 --- a/wp-gpx-maps_utils_nggallery.php +++ b/wp-gpx-maps_utils_nggallery.php @@ -28,10 +28,14 @@ function getNGGalleryImages( $ngGalleries, $ngImages, $dt, $lat, $lon, $dtoffset try { $pictures = array(); foreach ( $galids as $g ) { + if ($g != null ) { $pictures = array_merge( $pictures, nggdb::get_gallery( $g ) ); + } } foreach ( $imgids as $i ) { + if ($i != null) { array_push( $pictures, nggdb::find_image( $i ) ); + } } foreach ( $pictures as $p ) { $item = array();