From 0cc41b94b1715ed6ae0175f77403410552f671af Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sun, 10 Jan 2016 17:43:10 +0100 Subject: [ticket/14403] Don't expect user_id and user_ip in phpbb\log PHPBB3-14403 --- phpBB/phpbb/log/log.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index 3d995b4e4a..d46e3d1f3f 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -229,8 +229,8 @@ class log implements \phpbb\log\log_interface } $sql_ary = array( - 'user_id' => $user_id, - 'log_ip' => $log_ip, + 'user_id' => !empty($user_id) ? $user_id : ANONYMOUS, + 'log_ip' => !empty($log_ip) ? $log_ip : '', 'log_time' => $log_time, 'log_operation' => $log_operation, ); -- cgit v1.2.1 From d045822cd8cc2220a2ad3e159e3b688cb4049c12 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 13 Jan 2016 18:11:43 +0100 Subject: [ticket/14403] Set a default user id and ip in CLI PHPBB3-14403 --- phpBB/bin/phpbbcli.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB') diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php index ca425ad0c4..239dd3932b 100755 --- a/phpBB/bin/phpbbcli.php +++ b/phpBB/bin/phpbbcli.php @@ -59,6 +59,8 @@ $phpbb_container->get('request')->enable_super_globals(); require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); $user = $phpbb_container->get('user'); +$user->data['user_id'] = ANONYMOUS; +$user->ip = '127.0.0.1'; $user->add_lang('acp/common'); $user->add_lang('cli'); -- cgit v1.2.1