We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
is there any reason of not doing this
$this->controller = BaseController::getController() ?? new BaseController();
instead of this?
oc-menumanager-plugin/models/Menu.php
Line 165 in 9467eda
Now it creates router instance (and other stuff) every time \BenFreke\MenuManager\Models\Menu::getLinkHref is called.
\BenFreke\MenuManager\Models\Menu::getLinkHref
The text was updated successfully, but these errors were encountered:
Hi
??
Better code would be to instantiate the $this->controller in the construct method.
$this->controller
You're right though. This is bad code and if I had any tests when I wrote this 5 years ago I would have hopefully picked this up.
Sorry, something went wrong.
No branches or pull requests
Hi,
is there any reason of not doing this
instead of this?
oc-menumanager-plugin/models/Menu.php
Line 165 in 9467eda
Now it creates router instance (and other stuff) every time
\BenFreke\MenuManager\Models\Menu::getLinkHref
is called.The text was updated successfully, but these errors were encountered: