Browse files

Fixed some of the error handling code

  • Loading branch information...
1 parent 9231202 commit 024d2b5372c7a44c703a1f1ee788c32c06fbf853 @anthony-mills committed Feb 3, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 googlePlaces.php
View
6 googlePlaces.php
@@ -108,11 +108,11 @@ protected function _checkErrors()
$this->_errors[] = "API Call Type is required but is missing.";
}
- if(empty($this->APIKey)) {
+ if(empty($this->_apiKey)) {
$this->_errors[] = "API Key is is required but is missing.";
}
- if(($this->OutputType!="json") && ($this->OutputType!="xml") && ($this->OutputType!="json")) {
+ if(($this->_outputType!="json") && ($this->outputType!="xml") && ($this->outputType!="json")) {
$this->_errors[] = "OutputType is required but is missing.";
}
}
@@ -162,7 +162,7 @@ protected function _apiCall()
$URLToCall = $this->_apiUrl."/".$this->_apiCallType."/".$this->_outputType."?key=".$this->_apiKey."&".$URLparams;
$result = json_decode(file_get_contents($URLToCall),true);
- $result['errors'] = $this->Errors;
+ $result['errors'] = $this->_errors;
if($result[status]=="OK" && $this->_apiCallType=="details") {
foreach($result[result][address_components] as $key=>$component) {

0 comments on commit 024d2b5

Please sign in to comment.