Skip to content
Snippets Groups Projects
Commit f8c91e04 authored by Brandon Bergren's avatar Brandon Bergren
Browse files

fix E_ALL compliance issues in gmap_markerinfo.inc.

parent a78ee44e
No related branches found
No related tags found
No related merge requests found
...@@ -177,7 +177,7 @@ function _gmap_compress_icon_def($iconset) { ...@@ -177,7 +177,7 @@ function _gmap_compress_icon_def($iconset) {
for ($c1=0; $c1<count($iconset); $c1++) { for ($c1=0; $c1<count($iconset); $c1++) {
$temp = isset($iconset[$c1][$order[$c0]]) ? $iconset[$c1][$order[$c0]] : $nulls[$c0]; $temp = isset($iconset[$c1][$order[$c0]]) ? $iconset[$c1][$order[$c0]] : $nulls[$c0];
// Ensure that numeric quantities are encoded as ints, not strings. // Ensure that numeric quantities are encoded as ints, not strings.
if ($ints[$c0]) { if (isset($ints[$c0])) {
$temp = (int)$temp; $temp = (int)$temp;
} }
$a[$c0][$c1] = $temp; $a[$c0][$c1] = $temp;
...@@ -199,6 +199,9 @@ function _gmap_compress_icon_def($iconset) { ...@@ -199,6 +199,9 @@ function _gmap_compress_icon_def($iconset) {
* Remove trailing duplicates from an array. * Remove trailing duplicates from an array.
*/ */
function _gmap_compress_array(&$arr) { function _gmap_compress_array(&$arr) {
if (empty($arr)) {
return;
}
$c = count($arr) - 1; $c = count($arr) - 1;
// Walk backwards and unset duplicates... // Walk backwards and unset duplicates...
for ($cval = $arr[$c]; $c>0; $c--) { for ($cval = $arr[$c]; $c>0; $c--) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment