From add4e38c1c6e4ccc95bbb9eda700db5e27a947e4 Mon Sep 17 00:00:00 2001 From: Mateusz Nowak Date: Thu, 10 Jul 2014 18:00:46 +0200 Subject: [PATCH] Prevent from crashes when url doesn't exists Cherry picked from 3655b79..0d62434 --- lib/Addr/Client.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Addr/Client.php b/lib/Addr/Client.php index 6ba8c6b..1b9d6d5 100644 --- a/lib/Addr/Client.php +++ b/lib/Addr/Client.php @@ -255,7 +255,10 @@ class Client */ private function completePendingLookup($id, $addr, $type) { - call_user_func($this->pendingLookups[$id]['callback'], $addr, $type); + if (isset($this->pendingLookups[$id])) { + call_user_func($this->pendingLookups[$id]['callback'], $addr, $type); + } + unset($this->pendingLookups[$id]); }