[Tickets #14950] Re: count(): Parameter must be an array or an object that implements Countable on line 980 of Compose.php

noreply at bugs.horde.org noreply at bugs.horde.org
Fri Sep 27 08:03:18 UTC 2019


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/14950
------------------------------------------------------------------------------
  Ticket             | 14950
  Updated By         | pouyan.azari at uni-wuerzburg.de
  Summary            | count(): Parameter must be an array or an object that
                     | implements Countable on line 980 of Compose.php
  Queue              | IMP
  Version            | 6.2.24
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


pouyan.azari at uni-wuerzburg.de (2019-09-27 08:03) wrote:

Hi,

I had the same error and created this small patch:

diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php
index fca3a4d..4c48cf5 100755
--- a/imp/lib/Compose.php
+++ b/imp/lib/Compose.php
@@ -977,7 +977,7 @@ class IMP_Compose implements ArrayAccess,  
Countable, IteratorAggregate
               ($prefs->isLocked('save_sent_mail') &&
                $prefs->getValue('save_sent_mail')))) {
              /* Keep Bcc: headers on saved messages. */
-            if (count($header['bcc'])) {
+            if (is_array($header['bcc']) && count($header['bcc'])) {
                  $headers->addHeader('Bcc', $header['bcc']);
              }





More information about the bugs mailing list