When magic_quotes_gpc is 'On' it also affects the $_FILES array and a filename
like 'bantu"s testfile.txt' will be returned as 'bantu\"s testfile.txt'.
Because utf8_basename() also strips off anything before the last backslash
the filename was returned as '"s testfile.txt'.
Calling stripslashes() before utf8_basename() solves the problem.
PHPBB3-9615