8000 TomTom provider: handle "Developer Inactive" error · geocoder-php/Geocoder@1517551 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

8000
Appearance settings

Commit 1517551

Browse files
committed
TomTom provider: handle "Developer Inactive" error
1 parent f9a0fb6 commit 1517551

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Geocoder/Provider/TomTom.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ private function executeQuery($query)
104104

105105
$content = (string) $this->getAdapter()->get($query)->getBody();
106106

107+
if (false !== stripos($content, "Developer Inactive")) {
108+
throw new InvalidCredentials('Map API Key provided is not valid.');
109+
}
110+
107111
try {
108112
$xml = new \SimpleXmlElement($content);
109113
} catch (\Exception $e) {

0 commit comments

Comments
 (0)
0