From 32882fd798ae0fe7e51f5c7ef2ff8501a5b57251 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 1 Jul 2010 23:29:25 +0200 Subject: [PATCH 1/2] [ticket/9694] Make sure string offset 0 exists to avoid E_NOTICE message. PHPBB3-9694 --- phpBB/download/file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 2154847865..03a37a58b4 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -61,7 +61,7 @@ if (isset($_GET['avatar'])) $avatar_group = false; $exit = false; - if ($filename[0] === 'g') + if (isset($filename[0]) && $filename[0] === 'g') { $avatar_group = true; $filename = substr($filename, 1); From 881c74688bc41d83c00db8c96715dc48d06c9d3d Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 1 Jul 2010 23:30:48 +0200 Subject: [PATCH 2/2] [ticket/9694] Call error_reporting() in download/file.php when in avatar mode. PHPBB3-9694 --- phpBB/download/file.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 03a37a58b4..97f4ff3c8a 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -31,6 +31,12 @@ else if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT' if (isset($_GET['avatar'])) { + if (!defined('E_DEPRECATED')) + { + define('E_DEPRECATED', 8192); + } + error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); + require($phpbb_root_path . 'config.' . $phpEx); if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))