Index: trunk/extensions/Maps/Maps_CoordinateParser.php |
— | — | @@ -20,10 +20,7 @@ |
21 | 21 | * @ingroup Maps |
22 | 22 | * |
23 | 23 | * @author Jeroen De Dauw |
24 | | - * |
25 | | - * TODO: |
26 | | - * support different coordinate seperators, currently only comma's are supported. |
27 | | - * esp spaces since these where allowed in previouse version. |
| 24 | + * |
28 | 25 | */ |
29 | 26 | class MapsCoordinateParser { |
30 | 27 | |
— | — | @@ -62,6 +59,12 @@ |
63 | 60 | $split = explode( $seperator, $coordinates ); |
64 | 61 | if ( count( $split ) == 2 ) break; |
65 | 62 | } |
| 63 | + |
| 64 | + // This should not happen, as the validity of the coordinate set is already ensured by the regexes, |
| 65 | + // but do the check anyway, and return false if it fails. |
| 66 | + if ( count( $split ) != 2 ) { |
| 67 | + return false; |
| 68 | + } |
66 | 69 | |
67 | 70 | $coordinates = array( |
68 | 71 | 'lat' => trim ( $split[0] ), |