From 88fb5635109ff5ed994aa5624c0bc1a95c814176 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 13 Jul 2012 20:14:18 +0200 Subject: Avoid warnings; silently pipe http: urls through rcmail::url() --- program/include/rcmail.php | 6 +++++- program/include/rcube_addressbook.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'program/include') diff --git a/program/include/rcmail.php b/program/include/rcmail.php index c70170209..a6b0bcd57 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -726,8 +726,12 @@ class rcmail extends rcube */ public function url($p) { - if (!is_array($p)) + if (!is_array($p)) { + if (strpos($p, 'http') === 0) + return $p; + $p = array('_action' => @func_get_arg(0)); + } $task = $p['_task'] ? $p['_task'] : ($p['task'] ? $p['task'] : $this->task); $p['_task'] = $task; diff --git a/program/include/rcube_addressbook.php b/program/include/rcube_addressbook.php index f5b32cd52..069ea5715 100644 --- a/program/include/rcube_addressbook.php +++ b/program/include/rcube_addressbook.php @@ -422,7 +422,7 @@ abstract class rcube_addressbook function get_col_values($col, $data, $flat = false) { $out = array(); - foreach ($data as $c => $values) { + foreach ((array)$data as $c => $values) { if ($c === $col || strpos($c, $col.':') === 0) { if ($flat) { $out = array_merge($out, (array)$values); -- cgit v1.2.3