[dev] patch for imp.php
Iain McFarlane
iain at imcfarla.homelinux.net
Mon Sep 13 14:04:40 PDT 2004
Hi,
for some reason I keep getting the error:
Invalid argument supplied for foreach()
in /var/www/html/horde/imp/lib/Identity/imp.php on line 314
This patch fixes it.
--- /var/www/html/horde/imp/lib/Identity/imp.php 2004-09-13
21:57:49.191084112 +0100
+++ /opt/backup/horde.1/imp/lib/Identity/imp.php 2004-09-01
23:02:15.000000000 +0100
@@ -311,17 +311,11 @@
foreach ($this->_identities as $key => $identity) {
$tieaddr = $this->getValue('tieto_addr', $key);
if (!empty($tieaddr)) {
- if (!is_array($tieaddr)) {
- if (!isset($list[$tieaddr])) {
- $list[$tieaddr] = $key;
+ foreach ($tieaddr as $val) {
+ if (!isset($list[$val])) {
+ $list[$val] = $key;
}
- } else {
- foreach ($tieaddr as $val) {
- if (!isset($list[$val])) {
- $list[$val] = $key;
- }
- }
- }
+ }
}
}
More information about the dev
mailing list