]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile.php
use an array of profiles rather than a looping cursor for profile lists
[quix0rs-gnu-social.git] / classes / Profile.php
index 228a0ae2028fc0a61b1d0a55f98420a496ad1b20..06ea31c4352d12e098df7b9d7920f60903cba96d 100644 (file)
@@ -98,7 +98,7 @@ class Profile extends Managed_DataObject
         return $this->_user;
     }
 
-       protected $_avatars = array();
+       protected $_avatars;
        
     function getAvatar($width, $height=null)
     {
@@ -106,6 +106,10 @@ class Profile extends Managed_DataObject
             $height = $width;
         }
 
+        if (!isset($this->_avatars)) {
+            $this->_avatars = array();
+        }
+
                if (array_key_exists($width, $this->_avatars)) {
                        return $this->_avatars[$width];
                }