summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-12-14 08:52:33 +0000
committeralecpl <alec@alec.pl>2009-12-14 08:52:33 +0000
commit463a03112260ecf39818eac09905f41d8e84ced7 (patch)
tree7696fffeade9d669cdcfbf102567278925e4ec59
parent9898fe315a142451f4004d4eb4972fb19322be98 (diff)
- handle situation when 2nd argument of exec_hook() isn't an array (#1486364)
-rw-r--r--program/include/rcube_plugin_api.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/program/include/rcube_plugin_api.php b/program/include/rcube_plugin_api.php
index 75f1cc478..6a26df8e4 100644
--- a/program/include/rcube_plugin_api.php
+++ b/program/include/rcube_plugin_api.php
@@ -181,6 +181,9 @@ class rcube_plugin_api
*/
public function exec_hook($hook, $args = array())
{
+ if (!is_array($args))
+ $args = array('arg' => $args);
+
$args += array('abort' => false);
$this->active_hook = $hook;