Forum
Fatal Error in Perch Shop prior to completing purchase
Hi, I have a Perch Shop up and running with PayPal and it is throwing this error right before a purchase can be completed (so the purchase is not completed):
Fatal error: Uncaught Error: Call to a member function send_order_email() on null in /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Events.class.php:25 Stack trace: #0 /srv/users/serverpilot/apps/43-ranch/public/admin/core/lib/Perch.class.php(232): PerchShop_Events::order_status(Object(PerchSystemEvent)) #1 /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Orders.class.php(86): Perch->event('shop.order_stat...', NULL, 'created') #2 /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Runtime.class.php(612): PerchShop_Orders->create_from_cart(Object(PerchShop_Cart), 'paypal-express', Object(PerchShop_Customer), Object(PerchShop_Address), Object(PerchShop_Address)) #3 /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/runtime/cart.php(186): PerchShop_Runtime->checkout('paypal-express', Array, 'default') #4 /srv/users/serverpilot/apps/43-ranch/public/admin/templates/pages/shop/checkout.php(10): in /srv/users/serverpilot/apps/43-ranch/public/admin/addons/apps/perch_shop/lib/PerchShop_Events.class.php on line 25
I did some googling and I found this (https://serverpilot.io/community/articles/how-to-resolve-call-to-undefined-function-mysql_connect.html) which seems to indicate that similar errors might be because apps aren't compatible with php 7+, so I just want to confirm that Perch Shop is compatible? This site is running 7.1.
Here is a link to the site: https://43ranch.com/ and I'm happy to provide template code if it helps. I wasn't just sure which templates, since a lot of the error seems to reference /lib/ files.
Are there any other errors logged before that? It's probably symptomatic of an earlier error.