Per Jessen wrote:
> Gary . wrote:
>> Calling it, the array_key_exists call always returns false
...
>> and I can't see what I've done wrong :(
>
> Might this be better:
>
> public static function getMessage($ec)
> {
> $text = '';
> if (array_key_exists($ec, $errors))
> {
> $text = $errors[$ec];
> }
>
> return $text;
> }
Well, not really...
1) Pg_Error_Test::testGetMessage_23505
array_key_exists() expects parameter 2 to be array, null given
(scope issue, I think - it assumes I am talking about a local $errors variable)
> Per Jessen, Zürich (11.2°C)
^^^^^^
Oh :) Maybe I should have just popped round and asked :))
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php