trongate / trongate-framework

The Trongate PHP framework
https://trongate.io
Other
1.12k stars 100 forks source link

Fixed error being thrown when using normal view from a sub module #146

Closed DaFa66 closed 1 year ago

DaFa66 commented 1 year ago

Changed protected ?string $module_name; to protected ?string $module_name = '';

Which fixes an error when parent::__construct(); not included in __construct() of a sub module with a normal $this->view()

Error message > Uncaught Error: Typed property Trongate::$module_name must not be accessed before initialization

Also added links to the Trongate docs for view() and template() methods