1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 07:07:51 +02:00
php-phpbb/tests/mock/dummy_router.php
Tristan Darricau b28b94b1f1 [ticket/16891] Do not change an extension status in the middle of a request
When enabling an extension, it should be considered as not being enabled for
the entire request as if the "enabled" flag is switch during the request, the
extension will stay not loaded (same when disabling an extension).

Example when it can be an issue today : if the router is called for the first
time after enabling the extension and if the extension uses a custom route
loader (like phpbb/pages) then the router will fail because the custom route
will be found but the custom loader will not be loaded and available.

PHPBB3-16891
2021-10-30 04:25:31 +02:00

32 lines
592 B
PHP

<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
class phpbb_mock_dummy_router extends phpbb_mock_router
{
public function __construct()
{
}
public function get_matcher()
{
$this->create_new_url_matcher();
return parent::get_matcher();
}
public function get_generator()
{
$this->create_new_url_generator();
return parent::get_generator();
}
}