aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-22 00:57:27 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-22 00:57:27 +0000
commitee9cc84bb1e34895869dd22b14401cf4d6d10f2a (patch)
treef68cd98240fbd62e9604f25fea7a1240d251e82c
parent953c20c3846e8ffd70392f12560cf39537c795b9 (diff)
downloadelgg-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.php2
-rw-r--r--engine/lib/widgets.php6
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) {