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

Module-Theme: TopMenu invalid type of value returned #24251

Closed
Krielkip opened this issue Aug 23, 2019 · 2 comments
Closed

Module-Theme: TopMenu invalid type of value returned #24251

Krielkip opened this issue Aug 23, 2019 · 2 comments
Assignees
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@Krielkip
Copy link
Contributor

Krielkip commented Aug 23, 2019

#22849 # Preconditions (*)

  1. master 2.3-dev

Steps to reproduce (*)

  1. Code Review, because of error in our stage.

Expected result (*)

  1. Continue with code

Actual result (*)

  1. PHP Error
2019/08/23 06:55:05 [error] 13943#13943: *579 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Argument 4 passed to Magento\Theme\Block\Html\Topmenu::_getHtml() must be of the type array, null given, called in vendor/magento/module-theme/Block/Html/Topmenu.php on line 186 and defined in vendor/magento/module-theme/Block/Html/Topmenu.php:204
Stack trace:
#0 vendor/magento/module-theme/Block/Html/Topmenu.php(186): Magento\Theme\Block\Html\Topmenu->_getHtml(Object(Magento\Framework\Data\Tree\Node), 'submenu', 6, NULL)
#1 vendor/magento/module-theme/Block/Html/Topmenu.php(258): Magento\Theme\Block\Html\Topmenu->_addSubMenu(Object(Magento\Framework\Data\Tree\Node), 0, 'submenu', 6)
#2 vendor/magento/module-theme/Bl" while reading response header from upstream, client: 172.28.128.1, server: *.hypernode.local, request: "GET / HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "magento2.hypernode.local"

Also added an fix pull request; Which will be linked to this issue.

The issue is that in the topmenu building a submenu, it goes to an function which builds an array of _columnBrake.
Only if $total <= $limit then the return is void; aka null. The _getHtml needs an Array, but gets Null; This results in fatal error.

@m2-assistant
Copy link

m2-assistant bot commented Aug 23, 2019

Hi @Krielkip. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@Krielkip do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Aug 23, 2019
@ghost ghost assigned Krielkip Aug 23, 2019
@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Aug 28, 2019
@magento-engcom-team
Copy link
Contributor

Hi @Krielkip. Thank you for your report.
The issue has been fixed in #24252 by @Krielkip in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.4 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

2 participants