diff options
| author | Chris Smith <toonarmy@phpbb.com> | 2008-09-23 12:56:34 +0000 |
|---|---|---|
| committer | Chris Smith <toonarmy@phpbb.com> | 2008-09-23 12:56:34 +0000 |
| commit | b486710ea127ca055ac1cb117f056e837a32370f (patch) | |
| tree | 2b43cc026f1242dc1c4bc2caff372aaf5d45c81c /phpBB/includes/functions_admin.php | |
| parent | aa9dbcec3c95efda6b3087c4bc6a48a0cef48774 (diff) | |
| download | forums-b486710ea127ca055ac1cb117f056e837a32370f.tar forums-b486710ea127ca055ac1cb117f056e837a32370f.tar.gz forums-b486710ea127ca055ac1cb117f056e837a32370f.tar.bz2 forums-b486710ea127ca055ac1cb117f056e837a32370f.tar.xz forums-b486710ea127ca055ac1cb117f056e837a32370f.zip | |
Merge in r8843, r8908, r8909
git-svn-id: file:///svn/phpbb/trunk@8910 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
| -rw-r--r-- | phpBB/includes/functions_admin.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index b813f9b68c..2d44ef0271 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2385,8 +2385,14 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id if (isset($user->lang[$row['log_operation']])) { - // We supress the warning about inappropriate number of passed parameters here due to possible changes within LOG strings from one version to another. - $log[$i]['action'] = @vsprintf($log[$i]['action'], $log_data_ary); + // Check if there are more occurrences of % than arguments, if there are we fill out the arguments array + // It doesn't matter if we add more arguments than placeholders + if (substr_count($log[$i]['action'], '%') - sizeof($log_data_ary)) + { + $log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($log[$i]['action'], '%') - sizeof($log_data_ary), '')); + } + + $log[$i]['action'] = vsprintf($log[$i]['action'], $log_data_ary); // If within the admin panel we do not censor text out if (defined('IN_ADMIN')) |
