PHP Warning: array_key_exists()
Brought to you by:
jabbett
PHP Warning: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in /var/www/weather/pxweather.class.php on line 98
/*
** Return a specific field from the current weather report
*/
function getCurrent($field) {
$o = $this->_getObservation();
if (array_key_exists($field, $o)) {
return $o[$field];
}
else {
return null;
}
}
Line 98 is: if (array_key_exists($field, $o)) {
Any clues about this?