aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {