[ticket/12262] Do not use getExtension()

The method is php 5.3.6+ only.

PHPBB3-12262
[ticket/12262] Do not use inline assignments

PHPBB3-12262