Mercurial > hg > rc2
comparison program/lib/Roundcube/rcube_result_thread.php @ 19:b6a96bdd6b29
More cleaning up php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Wed, 08 Oct 2025 08:50:44 -0400 |
| parents | abddb304201f |
| children | 929c05ba3b2f |
comparison
equal
deleted
inserted
replaced
| 18:b631c1c7a3ce | 19:b6a96bdd6b29 |
|---|---|
| 107 * | 107 * |
| 108 * @return int Number of elements | 108 * @return int Number of elements |
| 109 */ | 109 */ |
| 110 public function count() | 110 public function count() |
| 111 { | 111 { |
| 112 if ($this->meta['count'] !== null) | 112 if (!empty($this->meta['count'])) { |
| 113 return $this->meta['count']; | 113 return $this->meta['count']; |
| 114 | 114 } |
| 115 if (empty($this->raw_data)) { | 115 if (empty($this->raw_data)) { |
| 116 $this->meta['count'] = 0; | 116 $this->meta['count'] = 0; |
| 117 } | 117 } |
| 118 else { | 118 else { |
| 119 $this->meta['count'] = 1 + substr_count($this->raw_data, self::SEPARATOR_ELEMENT); | 119 $this->meta['count'] = 1 + substr_count($this->raw_data, self::SEPARATOR_ELEMENT); |
| 601 } | 601 } |
| 602 | 602 |
| 603 foreach ($messages as $msg) { | 603 foreach ($messages as $msg) { |
| 604 if ($msg) { | 604 if ($msg) { |
| 605 $node .= ($depth ? self::SEPARATOR_ITEM.$depth.self::SEPARATOR_LEVEL : '').$msg; | 605 $node .= ($depth ? self::SEPARATOR_ITEM.$depth.self::SEPARATOR_LEVEL : '').$msg; |
| 606 $this->meta['messages']++; | 606 if (isset($this->meta['messages'])) { |
| 607 $this->meta['messages']++; | |
| 608 } | |
| 609 else { | |
| 610 $this->meta['messages'] = 1; | |
| 611 } | |
| 607 $depth++; | 612 $depth++; |
| 608 } | 613 } |
| 609 } | 614 } |
| 610 | 615 |
| 611 if ($stop < $end) { | 616 if ($stop < $end) { |
