Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

PHP7 exception in sendTransactionalEmails #4

Open
printminion opened this issue Jan 24, 2019 · 0 comments
Open

PHP7 exception in sendTransactionalEmails #4

printminion opened this issue Jan 24, 2019 · 0 comments

Comments

@printminion
Copy link

Please check if invoice is null in the method

\Netresearch_OPS_Model_Observer::sendTransactionalEmails

since in PHP7 here \Netresearch_OPS_Helper_Data::sendTransactionalEmail you will get an null exception.

        try {
            Mage::helper('ops/data')->sendTransactionalEmail($order);
            Mage::helper('ops/data')->sendTransactionalEmail($order->getPayment()->getCreatedInvoice());
        } catch (Exception $e) {
            Mage::logException($e);
        }
 $invoice = $order->getPayment()->getCreatedInvoice();
 if ($invoice) {
     Mage::helper('ops/data')->sendTransactionalEmail($invoice);
 }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant