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

[email protected] Fri, 27 Sep 2019 08:03:18 +0000
Newsgroups gmane.comp.horde.bugs
Message-ID <[email protected]>
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/14950
------------------------------------------------------------------------------
  Ticket             | 14950
  Updated By         | [email protected]
  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             |
------------------------------------------------------------------------------


[email protected] (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']);
              }



-- 
bugs mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]