From b13761eb261e928ed7ee1d88d88d313bff1de0f8 Mon Sep 17 00:00:00 2001 From: fritzy Date: Wed, 26 Nov 2008 10:56:47 +0000 Subject: [PATCH] * Fixed PHP notice git-svn-id: svn://netflint.net/xmpphp@70 ef36c318-a008-4979-b6e8-6b496270793b --- XMPPHP/XMLStream.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/XMPPHP/XMLStream.php b/XMPPHP/XMLStream.php index 7b54d63..0fcfea3 100644 --- a/XMPPHP/XMLStream.php +++ b/XMPPHP/XMLStream.php @@ -472,12 +472,12 @@ class XMPPHP_XMLStream { } if(array_key_exists($event_key, $this->until_payload)) { $payload = $this->until_payload[$event_key]; + unset($this->until_payload[$event_key]); + unset($this->until_count[$event_key]); + unset($this->until[$event_key]); } else { $payload = array(); } - unset($this->until_payload[$event_key]); - unset($this->until_count[$event_key]); - unset($this->until[$event_key]); return $payload; } @@ -647,6 +647,9 @@ class XMPPHP_XMLStream { if(is_array($until)) { if(in_array($name, $until)) { $this->until_payload[$key][] = array($name, $payload); + if(!isset($this->until_count[$key])) { + $this->until_count[$key] = 0; + } $this->until_count[$key] += 1; #$this->until[$key] = false; }