aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/widgets.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 7193850ef..076a8fa91 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -828,7 +828,11 @@ function widget_photo_rand($arr) {
else
$album = '';
- $channel_id = get_app()->profile_uid;
+ $channel_id = 0;
+ if(array_key_exists('channel_id',$arr) && intval($arr['channel_id']))
+ $channel_id = intval($arr['channel_id']);
+ if(! $channel_id)
+ $channel_id = get_app()->profile_uid;
if(! $channel_id)
return '';