summaryrefslogtreecommitdiff
path: root/framework/Collections
diff options
context:
space:
mode:
authorjavalizard <>2010-10-04 04:25:57 +0000
committerjavalizard <>2010-10-04 04:25:57 +0000
commit53d40a465408549a8518dbfd9ee0a4489a2480b1 (patch)
treeceb931c99833c59f5886b74ae0134a94c1108634 /framework/Collections
parent50ddd5e598fee58ef6841172fc0c02e4817eadc1 (diff)
#247 Tweaked the appending function
Diffstat (limited to 'framework/Collections')
-rw-r--r--framework/Collections/TPriorityList.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/framework/Collections/TPriorityList.php b/framework/Collections/TPriorityList.php
index 1b7cff32..41d6a03f 100644
--- a/framework/Collections/TPriorityList.php
+++ b/framework/Collections/TPriorityList.php
@@ -319,10 +319,8 @@ class TPriorityList extends TList
else
$cc+=count($items);
- if($index === false) {
+ if($index === false && isset($this->_d[$priority])) {
$c = count($this->_d[$priority]);
- if(!$c && $this->_c) // no items at this priority, but there exist items in this list
- $this->_o = false;
$c += $cc;
$this->_d[$priority][]=$item;
} else if(isset($this->_d[$priority])) {
@@ -338,10 +336,8 @@ class TPriorityList extends TList
array_splice($this->_fd,$c,0,array($item));
} else {
$c = null;
- if($index === false) {
+ if($index === false && isset($this->_d[$priority])) {
$cc = count($this->_d[$priority]);
- if(!$cc && $this->_c)
- $this->_o = false;
$this->_d[$priority][]=$item;
} else if(isset($this->_d[$priority])) {
$cc = $index;