aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/avatar/manager.php26
1 files changed, 16 insertions, 10 deletions
diff --git a/phpBB/includes/avatar/manager.php b/phpBB/includes/avatar/manager.php
index f126d69300..58d994c3c0 100644
--- a/phpBB/includes/avatar/manager.php
+++ b/phpBB/includes/avatar/manager.php
@@ -46,6 +46,17 @@ class phpbb_avatar_manager
protected $container;
/**
+ * Default avatar data row
+ * @var array
+ */
+ static protected $default_row = array(
+ 'avatar' => '',
+ 'avatar_type' => '',
+ 'avatar_width' => '',
+ 'avatar_height' => '',
+ );
+
+ /**
* Construct an avatar manager object
*
* @param phpbb_config $config phpBB configuration
@@ -174,20 +185,15 @@ class phpbb_avatar_manager
*/
static public function clean_row($row)
{
- $keys = array_keys($row);
- $values = array_values($row);
-
// Upon creation of a user/group $row might be empty
- if (empty($keys))
+ if (empty($row))
{
- return array(
- 'avatar' => '',
- 'avatar_type' => '',
- 'avatar_width' => '',
- 'avatar_height' => '',
- );
+ return self::$default_row;
}
+ $keys = array_keys($row);
+ $values = array_values($row);
+
$keys = array_map(array('phpbb_avatar_manager', 'strip_prefix'), $keys);
return array_combine($keys, $values);