aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2020-12-07 11:08:41 +0100
committerMario <mario@mariovavti.com>2020-12-07 11:08:41 +0100
commitd984918c75f4721975a0db55d8d05cf424b55e16 (patch)
tree4e98c0c62c4018a9870792d98fc4cf2ba0d7a4f2
parent9c7ec55b4049599f3a61192eaf020e3a112dfa0e (diff)
downloadvolse-hubzilla-d984918c75f4721975a0db55d8d05cf424b55e16.tar.gz
volse-hubzilla-d984918c75f4721975a0db55d8d05cf424b55e16.tar.bz2
volse-hubzilla-d984918c75f4721975a0db55d8d05cf424b55e16.zip
Skip profile photo query from addons for undefined channel id
-rw-r--r--Zotlabs/Module/Photo.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index c88696578..01edda9ae 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -81,18 +81,18 @@ class Photo extends \Zotlabs\Web\Controller {
else
$data = dbunescbin($r[0]['content']);
}
- }
- if(! $data) {
- $d = [ 'imgscale' => $resolution, 'channel_id' => $uid, 'default' => $default, 'data' => '', 'mimetype' => '' ];
- call_hooks('get_profile_photo',$d);
-
- $resolution = $d['imgscale'];
- $uid = $d['channel_id'];
- $default = $d['default'];
- $data = $d['data'];
- $mimetype = $d['mimetype'];
- $modified = 0;
+ if(! $data) {
+ $d = [ 'imgscale' => $resolution, 'channel_id' => $uid, 'default' => $default, 'data' => '', 'mimetype' => '' ];
+ call_hooks('get_profile_photo',$d);
+
+ $resolution = $d['imgscale'];
+ $uid = $d['channel_id'];
+ $default = $d['default'];
+ $data = $d['data'];
+ $mimetype = $d['mimetype'];
+ $modified = 0;
+ }
}
if(! $data) {