From c73c1eb8061d59a77c74efe32a37c63e2ddcc863 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 27 Aug 2013 17:29:55 +0200 Subject: [PATCH] Fixed clearQueue() action not being deleted --- src/Player.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Player.php b/src/Player.php index feb60aff..b78a3a0f 100644 --- a/src/Player.php +++ b/src/Player.php @@ -899,8 +899,11 @@ class Player{ public function getBandwidth(){ return array_sum($this->bandwidthStats) / max(1, count($this->bandwidthStats)); } - + public function clearQueue(){ + if($this->connected === false){ + return false; + } ksort($this->received); if(($cnt = count($this->received)) > PLAYER_MAX_QUEUE){ foreach($this->received as $c => $t){