aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-06 01:05:09 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-06 01:05:09 +0000
commit9dc42a9254fe971e8d4765a62ee83bc70a1d2fb7 (patch)
tree8917234cd8112db765d7947141643e4f2db73413 /engine/lib/elgglib.php
parentdcc504978e665d164a2533196f707914cf841518 (diff)
downloadelgg-9dc42a9254fe971e8d4765a62ee83bc70a1d2fb7.tar.gz
elgg-9dc42a9254fe971e8d4765a62ee83bc70a1d2fb7.tar.bz2
Fixes #2774 - fixes several E_NOTICE issues - mostly due to accessign array indexes
git-svn-id: http://code.elgg.org/elgg/trunk@7844 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r--engine/lib/elgglib.php23
1 files changed, 16 insertions, 7 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 497f25953..f925429de 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -875,12 +875,19 @@ function unregister_elgg_event_handler($event, $object_type, $callback) {
function elgg_trigger_event($event, $object_type, $object = null) {
global $CONFIG;
- $events = array(
- $CONFIG->events[$event][$object_type],
- $CONFIG->events['all'][$object_type],
- $CONFIG->events[$event]['all'],
- $CONFIG->events['all']['all'],
- );
+ $events = array();
+ if (isset($CONFIG->events[$event][$object_type])) {
+ $events[] = $CONFIG->events[$event][$object_type];
+ }
+ if (isset($CONFIG->events['all'][$object_type])) {
+ $events[] = $CONFIG->events['all'][$object_type];
+ }
+ if (isset($CONFIG->events[$event]['all'])) {
+ $events[] = $CONFIG->events[$event]['all'];
+ }
+ if (isset($CONFIG->events['all']['all'])) {
+ $events[] = $CONFIG->events['all']['all'];
+ }
$args = array($event, $object_type, $object);
@@ -1092,7 +1099,9 @@ function elgg_trigger_plugin_hook($hook, $type, $params = null, $returnvalue = n
if (isset($CONFIG->hooks[$hook]['all'])) {
$hooks[] = $CONFIG->hooks[$hook]['all'];
}
- $hooks[] = $CONFIG->hooks['all']['all'];
+ if (isset($CONFIG->hooks['all']['all'])) {
+ $hooks[] = $CONFIG->hooks['all']['all'];
+ }
foreach ($hooks as $callback_list) {
if (is_array($callback_list)) {