From f1fae0c28c1caa28d6c91dc3a0b406882e37c454 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 18 Apr 2016 20:53:09 +1000 Subject: [PATCH] Fixed CLI updates to payments and no auth instance --- modules/payment/classes/Model/Payment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/payment/classes/Model/Payment.php b/modules/payment/classes/Model/Payment.php index c26b150a..0f7a6e62 100644 --- a/modules/payment/classes/Model/Payment.php +++ b/modules/payment/classes/Model/Payment.php @@ -148,7 +148,7 @@ class Model_Payment extends ORM_OSB { $items = $this->subitems(); // If a user modified this payment, we'll update the source to their ID. - if ($ao = Auth::instance()->get_user()) + if (PHP_SAPI !== 'cli' AND $ao = Auth::instance()->get_user()) $this->source_id = $ao->id; $this->ip = Request::$client_ip;