]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile_photo.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / mod / profile_photo.php
index 11e671afc58a2f58e5ef51655d55a473e78aa708..fea6bb167b0af1513fd1ed70b8eaaaec88eea80d 100644 (file)
@@ -32,7 +32,7 @@ function profile_photo_post(&$a) {
                                intval($_REQUEST['profile']),
                                intval(local_user())
                        );
-                       if(count($r) && (! intval($r[0]['is-default'])))
+                       if(dbm::is_result($r) && (! intval($r[0]['is-default'])))
                                $is_default_profile = 0;
                }
 
@@ -63,7 +63,7 @@ function profile_photo_post(&$a) {
                        dbesc(local_user()),
                        intval($scale));
 
-               if(count($r)) {
+               if(dbm::is_result($r)) {
 
                        $base_image = $r[0];
 
@@ -195,7 +195,7 @@ function profile_photo_content(&$a) {
                        intval(local_user()),
                        dbesc($resource_id)
                        );
-               if (!count($r)){
+               if (!dbm::is_result($r)){
                        notice( t('Permission denied.') . EOL );
                        return;
                }