[ticket/11335] (hook finder) Make php_ext 'php' not '.php'

PHPBB3-11335
This commit is contained in:
Nathan Guse 2013-04-24 17:17:53 -05:00
parent ce230f8dea
commit fe89e56686
2 changed files with 2 additions and 2 deletions

View file

@ -173,7 +173,7 @@ services:
class: phpbb_hook_finder
arguments:
- %core.root_path%
- .%core.php_ext%
- %core.php_ext%
- @cache.driver
kernel_request_subscriber:

View file

@ -66,7 +66,7 @@ class phpbb_hook_finder
{
while (($file = readdir($dh)) !== false)
{
if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($this->php_ext) + 1)) === '.' . $this->php_ext)
if (strpos($file, 'hook_') === 0 && substr($file, -strlen('.' . $this->php_ext)) === '.' . $this->php_ext)
{
$hook_files[] = substr($file, 0, -(strlen($this->php_ext) + 1));
}