aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/cron/task
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-01-10 10:06:16 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-01-15 11:21:07 +0100
commit3a82ace3eb15ca1e0f4bfcfb2104cc15628ff1c3 (patch)
treedab8a92757a8333db846959c15d4a6ba8bff2e8a /phpBB/phpbb/cron/task
parent97e002cc3dc9a19b1fca10109c61b3d4e66ef201 (diff)
downloadforums-3a82ace3eb15ca1e0f4bfcfb2104cc15628ff1c3.tar
forums-3a82ace3eb15ca1e0f4bfcfb2104cc15628ff1c3.tar.gz
forums-3a82ace3eb15ca1e0f4bfcfb2104cc15628ff1c3.tar.bz2
forums-3a82ace3eb15ca1e0f4bfcfb2104cc15628ff1c3.tar.xz
forums-3a82ace3eb15ca1e0f4bfcfb2104cc15628ff1c3.zip
[ticket/14402] Do not expect user id and ip to be available in cron
PHPBB3-14402
Diffstat (limited to 'phpBB/phpbb/cron/task')
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_plupload.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/phpbb/cron/task/core/tidy_plupload.php b/phpBB/phpbb/cron/task/core/tidy_plupload.php
index d7364374af..027804ae68 100644
--- a/phpBB/phpbb/cron/task/core/tidy_plupload.php
+++ b/phpBB/phpbb/cron/task/core/tidy_plupload.php
@@ -90,7 +90,9 @@ class tidy_plupload extends \phpbb\cron\task\base
}
catch (\UnexpectedValueException $e)
{
- $phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_PLUPLOAD_TIDY_FAILED', false, array(
+ $user_id = (empty($user->data)) ? ANONYMOUS : $user->data['user_id'];
+ $user_ip = (empty($user->ip)) ? '' : $user->ip;
+ $phpbb_log->add('critical', $user_id, $user_ip, 'LOG_PLUPLOAD_TIDY_FAILED', false, array(
$this->plupload_upload_path,
$e->getMessage(),
$e->getTraceAsString()