Hello,
Using QTPro v 7.4.5 with Phoenix 1.0.8.18 I am getting the following error (note that the order is registered in admin but the email does not generate as the customer's checkout process page goes blank upon paying when there are several options chosen. Products with one option only do not generate the error and the email is sent).
===========
PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /xx/xx/xx/catalog/templates/override/includes/hooks/shop/siteWide/qtPro.php:85
Stack trace:
#0 /xx/xx/xx/catalog/includes/system/versioned/1.0.8.1/hooks.php(150): hook_shop_siteWide_qtPro->listen_update_stock_qtpro(Array)
#1 /xx/xx/xx/catalg/includes/system/versioned/1.0.8.1/hooks.php(133): hooks->cat('afterStart', Array)
#2 /xx/xx/xx/catalog/includes/classes/magic/pipeline_surface.php(16): hooks->register_pipeline('after', Array)
#3 /xx/xx/xx/catalog/includes/system/versioned/1.0.8.1/hooks.php(160): pipeline_surface->__call('after', Array)
#4 /xx/xx/xx/catalog/includes/system/segments/checkout/pipeline.php(14): hooks->generate('startCheckout')
#5 /xx/xx/xx/catalog/checkout_process.php(15): require('/homepages/35/d...')
#6 {main}
thrown in /xx/xx/xx/catalog/templates/override/includes/hooks/shop/siteWide/qtPro.php on line 85
QTpro
Fatal Error Uncaught Type Error array_key_exists - QTpro
-
- VIP Member
- Posts: 119
- Joined: Thu Oct 29, 2020 12:34 pm
- Contact:
Re: Fatal Error Uncaught Type Error array_key_exists
Hi,
I suppose this happens when the product has a non stocked attribute.
Please try changing in templates\override\includes\hooks\shop\siteWide\qtPro.php line 85 to:
and report back. I'll then update the package.
Best wishes
Rainer
I suppose this happens when the product has a non stocked attribute.
Please try changing in templates\override\includes\hooks\shop\siteWide\qtPro.php line 85 to:
Code: Select all
if ( is_array($attributes_stock_array) && array_key_exists($attribute_comb, $attributes_stock_array) ) {
Best wishes
Rainer
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
- PhoenixCart Developer
- Posts: 1184
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Contact:
Re: Fatal Error Uncaught Type Error array_key_exists
raiwa wrote:Hi,
I suppose this happens when the product has a non stocked attribute.
Please try changing in templates\override\includes\hooks\shop\siteWide\qtPro.php line 85 to:and report back. I'll then update the package.Code: Select all
if ( is_array($attributes_stock_array) && array_key_exists($attribute_comb, $attributes_stock_array) ) {
Best wishes
Rainer
Hi Rainer,
That worked! Thanks so much. Have a great day.
-
- VIP Member
- Posts: 119
- Joined: Thu Oct 29, 2020 12:34 pm
- Contact:
Re: Fatal Error Uncaught Type Error array_key_exists
Thank You.
Uploaded update 7.4.6. with the above and some other fixes.
Uploaded update 7.4.6. with the above and some other fixes.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
- PhoenixCart Developer
- Posts: 1184
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Contact: