phpBB

Code Changes

File: phpbb/avatar/driver/upload.php

  Unmodified   Added   Modified   Removed
Line 167Line 167
		$file->clean_filename('avatar', $prefix, $row['id']);

// If there was an error during upload, then abort operation

		$file->clean_filename('avatar', $prefix, $row['id']);

// If there was an error during upload, then abort operation

		if (sizeof($file->error))

		if (count($file->error))

		{
$file->remove();
$error = $file->error;

		{
$file->remove();
$error = $file->error;

Line 221Line 221

unset($filedata);



unset($filedata);


		if (!sizeof($error))

		if (!count($error))

		{
// Move file and overwrite any existing image
$file->move_file($destination, true);

		{
// Move file and overwrite any existing image
$file->move_file($destination, true);

Line 229Line 229

// If there was an error during move, then clean up leftovers
$error = array_merge($error, $file->error);


// If there was an error during move, then clean up leftovers
$error = array_merge($error, $file->error);

		if (sizeof($error))

		if (count($error))

		{
$file->remove();
return false;

		{
$file->remove();
return false;

Line 291Line 291
		);
extract($this->dispatcher->trigger_event('core.avatar_driver_upload_delete_before', compact($vars)));


		);
extract($this->dispatcher->trigger_event('core.avatar_driver_upload_delete_before', compact($vars)));


		if (!sizeof($error) && $this->filesystem->exists($filename))

		if (!count($error) && $this->filesystem->exists($filename))

		{
try
{

		{
try
{