Skip to content
New issue

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

Fatal error when calling execute() #771

Closed
kschroeder opened this issue Nov 25, 2014 · 5 comments
Closed

Fatal error when calling execute() #771

kschroeder opened this issue Nov 25, 2014 · 5 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@kschroeder
Copy link
Contributor

This is more of a question than a bug, but when creating controllers without an execute() method defined for Magento\Framework\App\Action\Action there is a fatal error if that method is not defined. The dispatch() method calls the execute() method on itself. That's not really all that surprising. But I was wondering what the use case is that we don't define the method execute() as abstract, since it's technically a requirement if the dispatch() method is called. It may be a minor thing but I would rather get a compiler or IDE error instead of a runtime error, especially when the dependency on that method is known. Perhaps it relates to mocking action classes, I don't know, but I was wondering why that method is called without being declared as abstract.

@antonkril
Copy link
Contributor

It's a mistake. We'll fix this. Thanks for bringing this up.

@verklov verklov self-assigned this Dec 1, 2014
@maksek
Copy link
Contributor

maksek commented Jan 8, 2015

Hi @kschroeder, let us know if the issue was fixed.

@kschroeder
Copy link
Contributor Author

I'm looking over the m2 code on Github and I don't see the method execute() defined in the action interface, the abstract action class nor the action class. This would still seem to cause the behavior noted in the issue.

@monkeysee
Copy link
Contributor

Internal ticket: MAGETWO-31249

@muasir muasir added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 23, 2015
@ilol ilol added the TECH label Mar 2, 2015
@vpelipenko vpelipenko removed the TECH label Mar 25, 2015
@vpelipenko vpelipenko removed their assignment Mar 25, 2015
@joanhe
Copy link
Contributor

joanhe commented Oct 6, 2015

This issue is fixed with pull request #1416

@joanhe joanhe closed this as completed Oct 6, 2015
mmansoor-magento pushed a commit that referenced this issue Jan 24, 2017
[SOUTH] Bugs:
- MAGETWO-61873 Customer email Enumeration through frontend login
- MAGETWO-58796 CMS Hierarchy menu is not shown when adding a page to hierarchy (when URL rewrite for new page exists)
- MAGETWO-62916 [GITHUB] Added fr_CH to allowed locales list #8019
fe-lix- pushed a commit to fe-lix-/magento2 that referenced this issue Apr 6, 2018
MSI-684: Grouped products work with Single Stock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

9 participants