diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-22 00:57:27 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-22 00:57:27 +0000 |
commit | ee9cc84bb1e34895869dd22b14401cf4d6d10f2a (patch) | |
tree | f68cd98240fbd62e9604f25fea7a1240d251e82c | |
parent | 953c20c3846e8ffd70392f12560cf39537c795b9 (diff) | |
download | elgg-ee9cc84bb1e34895869dd22b14401cf4d6d10f2a.tar.gz elgg-ee9cc84bb1e34895869dd22b14401cf4d6d10f2a.tar.bz2 |
widget column ids must be integers
git-svn-id: http://code.elgg.org/elgg/trunk@7407 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/classes/ElggWidget.php | 2 | ||||
-rw-r--r-- | engine/lib/widgets.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engine/classes/ElggWidget.php b/engine/classes/ElggWidget.php index b91fdfeb5..60f2b6be4 100644 --- a/engine/classes/ElggWidget.php +++ b/engine/classes/ElggWidget.php @@ -122,7 +122,7 @@ class ElggWidget extends ElggObject { ); $widgets = elgg_get_entities_from_private_settings($options); if (!$widgets) { - $this->column = $column; + $this->column = (int)$column; $this->order = 0; return; } diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php index 402a1fb85..cf73f664c 100644 --- a/engine/lib/widgets.php +++ b/engine/lib/widgets.php @@ -35,10 +35,10 @@ function elgg_get_widgets($user_guid, $context) { $sorted_widgets = array(); foreach ($widgets as $widget) { - if (!isset($sorted_widgets[$widget->column])) { - $sorted_widgets[$widget->column] = array(); + if (!isset($sorted_widgets[(int)$widget->column])) { + $sorted_widgets[(int)$widget->column] = array(); } - $sorted_widgets[$widget->column][$widget->order] = $widget; + $sorted_widgets[(int)$widget->column][$widget->order] = $widget; } foreach ($sorted_widgets as $col => $widgets) { |