aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/avatar/driver
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/avatar/driver')
-rw-r--r--phpBB/phpbb/avatar/driver/gravatar.php5
-rw-r--r--phpBB/phpbb/avatar/driver/local.php1
-rw-r--r--phpBB/phpbb/avatar/driver/remote.php5
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php2
4 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php
index 4aa7445d20..2082e0fd02 100644
--- a/phpBB/phpbb/avatar/driver/gravatar.php
+++ b/phpBB/phpbb/avatar/driver/gravatar.php
@@ -69,6 +69,11 @@ class gravatar extends \phpbb\avatar\driver\driver
$row['avatar_width'] = $request->variable('avatar_gravatar_width', 0);
$row['avatar_height'] = $request->variable('avatar_gravatar_height', 0);
+ if (empty($row['avatar']))
+ {
+ return false;
+ }
+
if (!function_exists('validate_data'))
{
require($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php
index ff1996854b..07b3ed59de 100644
--- a/phpBB/phpbb/avatar/driver/local.php
+++ b/phpBB/phpbb/avatar/driver/local.php
@@ -120,7 +120,6 @@ class local extends \phpbb\avatar\driver\driver
if (empty($category) || empty($file))
{
- $error[] = 'NO_AVATAR_SELECTED';
return false;
}
diff --git a/phpBB/phpbb/avatar/driver/remote.php b/phpBB/phpbb/avatar/driver/remote.php
index 455ddebf62..1bd7f6c927 100644
--- a/phpBB/phpbb/avatar/driver/remote.php
+++ b/phpBB/phpbb/avatar/driver/remote.php
@@ -53,6 +53,11 @@ class remote extends \phpbb\avatar\driver\driver
$width = $request->variable('avatar_remote_width', 0);
$height = $request->variable('avatar_remote_height', 0);
+ if (empty($url))
+ {
+ return false;
+ }
+
if (!preg_match('#^(http|https|ftp)://#i', $url))
{
$url = 'http://' . $url;
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index edc5941602..003b23659f 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -27,7 +27,6 @@ class upload extends \phpbb\avatar\driver\driver
* Construct a driver object
*
* @param \phpbb\config\config $config phpBB configuration
- * @param \phpbb\request\request $request Request object
* @param string $phpbb_root_path Path to the phpBB root
* @param string $php_ext PHP file extension
* @param \phpbb_path_helper $path_helper phpBB path helper
@@ -130,7 +129,6 @@ class upload extends \phpbb\avatar\driver\driver
}
else
{
- $error[] = 'NO_AVATAR_SELECTED';
return false;
}