← All changes
|
src/includes/externals/aweber/aweber_collection.php
+13
-0
260814
→
261001
View file →
| @@ -160,10 +160,14 @@ | ||
| 160 | 160 | * Allows this object to be accessed via bracket notation (ie $obj[$x]) |
| 161 | 161 | * http://php.net/manual/en/class.arrayaccess.php |
| 162 | 162 | */ |
| 163 | 163 | |
| 164 | + //260816 Suppress PHP 8.1+ tentative ArrayAccess return-type deprecations while preserving PHP 5.6 compatibility. | |
| 165 | + #[\ReturnTypeWillChange] | |
| 164 | 166 | public function offsetSet($offset, $value) {} |
| 167 | + #[\ReturnTypeWillChange] | |
| 165 | 168 | public function offsetUnset($offset) {} |
| 169 | + #[\ReturnTypeWillChange] | |
| 166 | 170 | public function offsetExists($offset) { |
| 167 | 171 | |
| 168 | 172 | if ($offset >=0 && $offset < $this->total_size) { |
| 169 | 173 | return true; |
| @@ -210,8 +214,9 @@ | ||
| 210 | 214 | $this->data[$item] = $data[$item]; |
| 211 | 215 | } |
| 212 | 216 | } |
| 213 | 217 | |
| 218 | + #[\ReturnTypeWillChange] | |
| 214 | 219 | public function offsetGet($offset) { |
| 215 | 220 | |
| 216 | 221 | if (!$this->offsetExists($offset)) { |
| 217 | 222 | return null; |
| @@ -236,24 +241,30 @@ | ||
| 236 | 241 | * Iterator |
| 237 | 242 | */ |
| 238 | 243 | protected $_iterationKey = 0; |
| 239 | 244 | |
| 245 | + //260816 Suppress PHP 8.1+ tentative Iterator return-type deprecations while preserving PHP 5.6 compatibility. | |
| 246 | + #[\ReturnTypeWillChange] | |
| 240 | 247 | public function current() { |
| 241 | 248 | return $this->offsetGet($this->_iterationKey); |
| 242 | 249 | } |
| 243 | 250 | |
| 251 | + #[\ReturnTypeWillChange] | |
| 244 | 252 | public function key() { |
| 245 | 253 | return $this->_iterationKey; |
| 246 | 254 | } |
| 247 | 255 | |
| 256 | + #[\ReturnTypeWillChange] | |
| 248 | 257 | public function next() { |
| 249 | 258 | $this->_iterationKey++; |
| 250 | 259 | } |
| 251 | 260 | |
| 261 | + #[\ReturnTypeWillChange] | |
| 252 | 262 | public function rewind() { |
| 253 | 263 | $this->_iterationKey = 0; |
| 254 | 264 | } |
| 255 | 265 | |
| 266 | + #[\ReturnTypeWillChange] | |
| 256 | 267 | public function valid() { |
| 257 | 268 | return $this->offsetExists($this->key()); |
| 258 | 269 | } |
| 259 | 270 | |
| @@ -262,8 +273,10 @@ | ||
| 262 | 273 | * Allows PHP's count() and sizeOf() functions to act on this object |
| 263 | 274 | * http://www.php.net/manual/en/class.countable.php |
| 264 | 275 | */ |
| 265 | 276 | |
| 277 | + //260816 Suppress PHP 8.1+ tentative Countable return-type deprecation while preserving PHP 5.6 compatibility. | |
| 278 | + #[\ReturnTypeWillChange] | |
| 266 | 279 | public function count() { |
| 267 | 280 | return $this->total_size; |
| 268 | 281 | } |
| 269 | 282 | } |