From 1dc910a60c3da85913952eeffe8d51fb10dc888c Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Thu, 11 Aug 2011 15:10:36 +0000 Subject: [PATCH] // fix pdf invoice when called from FO git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8037 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/PDF.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/PDF.php b/classes/PDF.php index fa8a7d883..3cb9c399c 100644 --- a/classes/PDF.php +++ b/classes/PDF.php @@ -487,7 +487,7 @@ class PDFCore extends PDF_PageGroupCore if (!$context) $context = Context::getContext(); - if (!Validate::isLoadedObject($order) OR (!$context->employee->id AND (!OrderState::invoiceAvailable($order->getCurrentState()) AND !$order->invoice_number))) + if (!Validate::isLoadedObject($order) OR ((isset($context->employee) && !$context->employee->id) AND (!OrderState::invoiceAvailable($order->getCurrentState()) AND !$order->invoice_number))) die('Invalid order or invalid order state'); self::$order = $order; self::$orderSlip = $slip;