config log_threshold, log_path, et al ill not work if set from assign_to_config - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: config log_threshold, log_path, et al ill not work if set from assign_to_config (/showthread.php?tid=71315) |
config log_threshold, log_path, et al ill not work if set from assign_to_config - tencrocs - 07-31-2018 Hi guys, Instead of editing config/config.php, I used $assign_to_config instead so that I will not have to touch what's inside config/config.php But I noticed that the following will not work if set from $assign_to_config: PHP Code: $assign_to_config['log_threshold'] This is due to the fact that load_class itself uses log_message which will use the config inside config/config.php because $assign_to_config has not been added to $config during it's first init. The $assign_to_config array eventually get copied to the $config but log_message will not be able to use it anymore . My workaround was to edit directly Codeigniter.php and insert the array right after the subclass_prefix PHP Code: /* I'm just a newbie to CodeIgniter and there might be a better solution to fix this and would love to hear your suggestions. CI v3.1.9 Thanks a lot. |