Closed dezsi-istvan closed 1 year ago
Can you show a minimum sample code to modify $class $method variables ? Or please send a PR to https://github.com/kenjis/ci-app-for-ci-phpunit-test
function pre_controller_hook_verify_permissions() {
if( not_have_permission() ){
$GLOBALS['class'] = 'MY_auth_access_denied'; //new controller
$GLOBALS['method'] = 'index'; //new method
}
}
Thank you for sending this PR. I released as v3.0.4.
in codeigniter pre_controller methods modifying global
$class
$method
variables can modify the routecode in codeigniter\framework\system\core\CodeIgniter.php
with this fix, this behavior will work in testing also