Index: trunk/extensions/Collection/Collection.session.php |
— | — | @@ -109,7 +109,7 @@ |
110 | 110 | |
111 | 111 | static function purge() { |
112 | 112 | if ( !self::hasSession() ) { |
113 | | - return; |
| 113 | + return false; |
114 | 114 | } |
115 | 115 | $coll = $_SESSION['wsCollection']; |
116 | 116 | $newitems = array(); |
— | — | @@ -136,11 +136,11 @@ |
137 | 137 | } |
138 | 138 | $coll['items'] = $newitems; |
139 | 139 | $_SESSION['wsCollection'] = $coll; |
| 140 | + return true; |
140 | 141 | } |
141 | 142 | |
142 | 143 | static function getCollection() { |
143 | | - self::purge(); |
144 | | - return $_SESSION['wsCollection']; |
| 144 | + return self::purge() ? $_SESSION['wsCollection'] : array(); |
145 | 145 | } |
146 | 146 | |
147 | 147 | static function setCollection( $collection ) { |