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

Exception in getMediaGalleryImages() #1

Open
wants to merge 1 commit into
base: 2.4-develop
Choose a base branch
from

Conversation

angelo983
Copy link
Owner

Trying to access a member function count() on array result in this error:
PHP Fatal error: Uncaught Error: Call to a member function count() on array in /vendor/magento/module-catalog/Model/Product.php:1533
Stack trace:
#0 /vendor/magento/module-configurable-product/Block/Plugin/Product/Media/Gallery.php(62): Magento\Catalog\Model\Product->getMediaGalleryImages()
#1 /vendor/magento/module-configurable-product/Block/Plugin/Product/Media/Gallery.php(49): Magento\ConfigurableProduct\Block\Plugin\Product\Media\Gallery->getProductGallery(Object(Magento\Catalog\Model\Product\Interceptor))
magento#2 /vendor/magento/framework/Interception/Interceptor.php(146): Magento\ConfigurableProduct\Block\Plugin\Product\Media\Gallery->afterGetOptionsMediaGalleryDataJson(Object(Magento\ProductVideo\Block\Product\View\Gallery\Interceptor), Array)

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. magento/magento2#<issue_number>: Issue title

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Trying to access a member function count() on array result in this error:
PHP Fatal error: Uncaught Error: Call to a member function count() on array in /vendor/magento/module-catalog/Model/Product.php:1533
Stack trace:
#0 /vendor/magento/module-configurable-product/Block/Plugin/Product/Media/Gallery.php(62): Magento\Catalog\Model\Product->getMediaGalleryImages()
#1 /vendor/magento/module-configurable-product/Block/Plugin/Product/Media/Gallery.php(49): Magento\ConfigurableProduct\Block\Plugin\Product\Media\Gallery->getProductGallery(Object(Magento\Catalog\Model\Product\Interceptor))
magento#2 /vendor/magento/framework/Interception/Interceptor.php(146): Magento\ConfigurableProduct\Block\Plugin\Product\Media\Gallery->afterGetOptionsMediaGalleryDataJson(Object(Magento\ProductVideo\Block\Product\View\Gallery\Interceptor), Array)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant