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 on saving a magento product #3692

Closed
dev-venkatesh opened this issue Dec 6, 2023 · 5 comments · Fixed by #3693
Closed

Fatal error on saving a magento product #3692

dev-venkatesh opened this issue Dec 6, 2023 · 5 comments · Fixed by #3693
Labels

Comments

@dev-venkatesh
Copy link

dev-venkatesh commented Dec 6, 2023

Try to create a simple product with add and remove "Tier Price". Then click on "Save". It is throwing "Fatal error".

Fatal error: Uncaught TypeError: Unsupported operand types: string * int in \src\app\code\core\Mage\Catalog\Model\Product\Attribute\Backend\Tierprice.php:54 Stack trace: #0 \src\app\code\core\Mage\Catalog\Model\Product\Attribute\Backend\Groupprice\Abstract.php(290): Mage_Catalog_Model_Product_Attribute_Backend_Tierprice->_getAdditionalUniqueFields(Array) #1 \src\app\code\core\Mage\Eav\Model\Entity\Abstract.php(640): Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract->afterSave(Object(Mage_Catalog_Model_Product)) #2 \src\app\code\core\Mage\Eav\Model\Entity\Abstract.php(1640): Mage_Eav_Model_Entity_Abstract->walkAttributes('backend/afterSa...', Array) #3 \src\app\code\core\Mage\Catalog\Model\Resource\Product.php(181): Mage_Eav_Model_Entity_Abstract->_afterSave(Object(Mage_Catalog_Model_Product)) #4 \src\app\code\core\Mage\Eav\Model\Entity\Abstract.php(1092): Mage_Catalog_Model_Resource_Product->_afterSave(Object(Mage_Catalog_Model_Product)) #5 \src\app\code\core\Mage\Core\Model\Abstract.php(379): Mage_Eav_Model_Entity_Abstract->save(Object(Mage_Catalog_Model_Product)) #6 \src\app\code\core\Mage\Adminhtml\controllers\Catalog\ProductController.php(751): Mage_Core_Model_Abstract->save() #7 \src\app\code\core\Mage\Core\Controller\Varien\Action.php(421): Mage_Adminhtml_Catalog_ProductController->saveAction() #8 \src\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(255): Mage_Core_Controller_Varien_Action->dispatch('save') #9 \src\app\code\core\Mage\Core\Controller\Varien\Front.php(181): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #10 \src\app\code\core\Mage\Core\Model\App.php(358): Mage_Core_Controller_Varien_Front->dispatch() #11 \src\app\Mage.php(740): Mage_Core_Model_App->run(Array) #12 \src\index.php(60): Mage::run('', 'store') #13 {main} thrown in \src\app\code\core\Mage\Catalog\Model\Product\Attribute\Backend\Tierprice.php on line 54

@fballiano
Copy link
Contributor

openmage version? php version?

@dev-venkatesh
Copy link
Author

PHP - 8.2.4
OpenMage - 20.2.0

@fballiano
Copy link
Contributor

I could save a product with a tier price without the error

Screenshot 2023-12-06 alle 10 10 45

do you have developer mode on?

@dev-venkatesh
Copy link
Author

dev-venkatesh commented Dec 6, 2023

Just add the tier price entries without filling any details and same spot just delete those and save the product. You will get the error.

@kiatng
Copy link
Collaborator

kiatng commented Dec 7, 2023

I can replicate the error

[07-Dec-2023 01:34:53 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * int in .../app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php:54

See https://onlinephp.io/c/9d8ff:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants