6.0.0-beta1
7/6/25

[#12232] PHP ERROR: array_flip(): Can only flip STRING and INTEGER values! on line 182 of framework/Imap_Client/lib/Horde/Imap/Client/Ids.php
Summary PHP ERROR: array_flip(): Can only flip STRING and INTEGER values! on line 182 of framework/Imap_Client/lib/Horde/Imap/Client/Ids.php
Queue Synchronization
Queue Version Git master
Type Bug
State Duplicate
Priority 1. Low
Owners
Requester tomi.orava (at) ncircle (dot) nullnet (dot) fi
Created 05/01/2013 (4449 days ago)
Due
Updated 05/11/2013 (4439 days ago)
Assigned 05/01/2013 (4449 days ago)
Resolved 05/06/2013 (4444 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/11/2013 01:52:01 PM tomi (dot) orava (at) ncircle (dot) nullnet (dot) fi Comment #12 Reply to this comment
Probably duplicate of Bug: 12239
Might be. Didn't get fixed though with the latest commits. I've now
updated to 75511fd7e5a80b85efaf19bef67d992b004df4a1 and the bug still
persists.
Did you recreate the account on the phone?
No, I didn't figure out that it was necessary. However, I've now 
re-tested and the error message is really gone.

Thanks!


05/06/2013 08:21:04 PM Michael Rubinsky Comment #11 Reply to this comment
Probably duplicate of Bug: 12239
Might be. Didn't get fixed though with the latest commits. I've now 
updated to 75511fd7e5a80b85efaf19bef67d992b004df4a1 and the bug 
still persists.
Did you recreate the account on the phone?
05/06/2013 08:17:11 PM tomi (dot) orava (at) ncircle (dot) nullnet (dot) fi Comment #10 Reply to this comment
Probably duplicate of Bug: 12239
Might be. Didn't get fixed though with the latest commits. I've now 
updated to 75511fd7e5a80b85efaf19bef67d992b004df4a1 and the bug still 
persists.

05/06/2013 04:00:13 PM Michael Rubinsky Comment #9
State ⇒ Duplicate
Reply to this comment
Probably duplicate of Bug: 12239
05/05/2013 09:01:47 AM tomi (dot) orava (at) ncircle (dot) nullnet (dot) fi Comment #8 Reply to this comment

[Show Quoted Text - 17 lines]
Ok, thanks for the pointers. Here is some more info & backtrace:

2013-05-05T11:39:18+03:00 DEBUG: Variable information:
array(19) {
   [0]=>
   array(2) {
     ["read"]=>
     int(0)
     ["flagged"]=>
     int(0)
   }
   [1]=>
   int(43400)
   [2]=>
   int(43405)
   [3]=>
   int(43421)
   [4]=>
   int(43422)
   [5]=>
   int(43423)
   [6]=>
   int(43424)
   [7]=>
   int(43425)
   [8]=>
   int(43426)
   [9]=>
   int(43427)
   [10]=>
   int(43429)
   [11]=>
   int(43431)
   [12]=>
   int(43432)
   [13]=>
   int(43433)
   [14]=>
   int(43440)
   [15]=>
   int(43441)
   [16]=>
   int(43442)
   [17]=>
   int(43443)
   [18]=>
   int(43444)
}

Backtrace:
  1. Horde_Rpc_ActiveSync->getResponse() horde/rpc.php:156
  2. Horde_ActiveSync->handleRequest() 
framework/Rpc/lib/Horde/Rpc/ActiveSync.php:141
  3. Horde_ActiveSync_Request_Base->handle() 
framework/ActiveSync/lib/Horde/ActiveSync.php:848
  4. Horde_ActiveSync_Request_Sync->_handle() 
framework/ActiveSync/lib/Horde/ActiveSync/Request/Base.php:236
  5. Horde_ActiveSync_Sync->init() 
framework/ActiveSync/lib/Horde/ActiveSync/Request/Sync.php:375
  6. Horde_ActiveSync_State_Sql->getChanges() 
framework/ActiveSync/lib/Horde/ActiveSync/Sync.php:149
  7. Horde_Core_ActiveSync_Driver->getServerChanges() 
framework/ActiveSync/lib/Horde/ActiveSync/State/Sql.php:825
  8. Horde_ActiveSync_Imap_Adapter->getMessageChanges() 
framework/Core/lib/Horde/Core/ActiveSync/Driver.php:648
  9. Horde_Imap_Client_Ids->__construct() 
framework/ActiveSync/lib/Horde/ActiveSync/Imap/Adapter.php:328
10. Horde_Imap_Client_Ids->add() 
framework/Imap_Client/lib/Horde/Imap/Client/Ids.php:82
11. Horde::debug() framework/Imap_Client/lib/Horde/Imap/Client/Ids.php:180

05/03/2013 01:29:19 PM Michael Rubinsky Comment #7 Reply to this comment
Ok, no wonder the log didn't show anything. There's something fishy 
going on as after I changed the activesync version to v14.1 and 
_rebooted_ the windows phone, it suddenly started to work just fine.
Now all the message bodies are being shown just fine (new & all, 
doesn't matter).
Yeah, EAS version changes do not seem to be picked up fully by clients 
automatically. They sometimes require a reboot, or in some cases, 
re-creating the account.
05/03/2013 01:27:36 PM Michael Rubinsky Comment #6 Reply to this comment
Can you provide a stack trace and/or the value of $this->_ids when
you get this error?
Ok, this seems to describe why the flip doesn't work ---> on windows 
client device
BTW, you can simply use print_r($this->_ids, true) to get a printable 
copy of the array values - or better yet, use 
Horde::debug($this->_ids); and this will output to a file named 
horde_debut.txt in your server's tmp directory.

This doesn't explain why the flip doesn't work. They are both arrays. 
The error complains that the value is NOT an array. We need both the 
value of the ids array as well as the backtrace when it doesn't equal 
an array. You can get a backtrace via either debug_bactrace() or just 
use Horde::debug which automatically generates it.


05/03/2013 06:08:30 AM tomi (dot) orava (at) ncircle (dot) nullnet (dot) fi Comment #5 Reply to this comment
Related or unrelated, the windows phone is able to list/show emails,
but the email body is always completely blank.
There was another report, Bug: 12203 from a Windows 8 device. The 
provided synclog didn't show anything wrong though. If you can 
provide a synclog please attach it, and reopen, Bug: 12203.
Ok, no wonder the log didn't show anything. There's something fishy 
going on as after I changed the activesync version to v14.1 and 
_rebooted_ the windows phone, it suddenly started to work just fine.
Now all the message bodies are being shown just fine (new & all, 
doesn't matter).

05/03/2013 06:05:16 AM tomi (dot) orava (at) ncircle (dot) nullnet (dot) fi Comment #4 Reply to this comment
Can you provide a stack trace and/or the value of $this->_ids when 
you get this error?
Ok, this seems to describe why the flip doesn't work ---> on windows 
client device
the _ids is an array as show below:

windows phone 8:

[03-May-2013 05:57:36 UTC] ERROR: _ids=[Array]
[03-May-2013 05:57:36 UTC] ERROR: array=[1]
[03-May-2013 05:57:36 UTC] ERROR: array=[2]
[03-May-2013 05:57:36 UTC] ERROR: array=[3]
[03-May-2013 05:57:36 UTC] ERROR: array=[4]
[03-May-2013 05:57:36 UTC] ERROR: array=[5]
[03-May-2013 05:57:36 UTC] ERROR: array=[6]
[03-May-2013 05:57:36 UTC] ERROR: array=[7]
[03-May-2013 05:57:36 UTC] ERROR: array=[8]
[03-May-2013 05:57:36 UTC] ERROR: array=[9]
[03-May-2013 05:57:36 UTC] ERROR: array=[10]
[03-May-2013 05:57:36 UTC] ERROR: array=[11]
[03-May-2013 05:57:36 UTC] ERROR: array=[12]
[03-May-2013 05:57:36 UTC] ERROR: array=[13]
[03-May-2013 05:57:36 UTC] ERROR: array=[14]
[03-May-2013 05:57:36 UTC] ERROR: array=[15]
[03-May-2013 05:57:36 UTC] ERROR: array=[16]
[03-May-2013 05:57:36 UTC] ERROR: array=[17]
[03-May-2013 05:57:36 UTC] ERROR: array=[18]
[03-May-2013 05:57:36 UTC] ERROR: array=[19]
[03-May-2013 05:57:36 UTC] ERROR: array=[20]

An android device:

[03-May-2013 05:57:36 UTC] ERROR: _ids=[Array]
[03-May-2013 05:57:36 UTC] ERROR: array=[386]

The output is retrieved using the following lines:

                     $errmsg=$this->_ids;
                     error_log("ERROR: _ids=[" . $errmsg . "]", 0);
                     foreach($this->_ids as $foobar) {
                         error_log("ERROR: array=[" . $foobar . "]", 0);
                     }

05/01/2013 09:58:30 PM Michael Rubinsky Comment #3 Reply to this comment
Related or unrelated, the windows phone is able to list/show emails, 
but the email body is always completely blank.
There was another report, Bug: 12203 from a Windows 8 device. The 
provided synclog didn't show anything wrong though. If you can provide 
a synclog please attach it, and reopen, Bug: 12203.

Thanks.
05/01/2013 09:54:35 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
Can you provide a stack trace and/or the value of $this->_ids when you 
get this error?
05/01/2013 09:50:03 PM Michael Rubinsky Version ⇒ Git master
Queue ⇒ Synchronization
 
05/01/2013 09:45:26 PM tomi (dot) orava (at) ncircle (dot) nullnet (dot) fi Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ PHP ERROR: array_flip(): Can only flip STRING and INTEGER values! on line 182 of framework/Imap_Client/lib/Horde/Imap/Client/Ids.php
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
It seems android devices (nexus 7 and galaxy s3) are working just fine 
with the latest activesync (v14.1), while my wifes nokia lumia 820 
generates the following error while trying to synchronize mails:
Used git revision: a9450a21b521361da536f15efcd4d96cd519bc9f

PHP ERROR: array_flip(): Can only flip STRING and INTEGER values! [ on 
line 182 of "/framework/Imap_Client/lib/Horde/Imap/Client/Ids.php"

Related or unrelated, the windows phone is able to list/show emails, 
but the email body is always completely blank.

Saved Queries