Error when accessing base controller variable |
Hi there, I'm hoping someone can help. I've got a class that I'm using in my controllers and libraries to handle settings that are stored in the database. When accessing them in my controller via $this->settings->get('blah'), I have no problems at all.
However, when I pass $this->settings in the controller's __construct() to my template library, it's passing a null value and I get this error: Quote:TypeError I've loaded the library in the base controller as shown below. This is my BaseController: PHP Code: public $session, $settings; This is the Settings class: PHP Code: class Settings { And finally my controller itself: PHP Code: class AccountController extends BaseController Any help would be greatly appreciated! Thanks.
WebDevZone - A new, friendly web development community
|
Messages In This Thread |
Error when accessing base controller variable - by campingrhino - 06-29-2020, 02:14 PM
RE: Error when accessing base controller variable - by captain-sensible - 07-02-2020, 01:20 PM
RE: Error when accessing base controller variable - by ojmichael - 07-02-2020, 09:23 PM
|