From de0904ba1c5d2cccd213b628cacb645f3357c2dc Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 26 May 2021 09:26:13 +1000 Subject: [PATCH] Fixes for request property accessor --- app/Jobs/Account/CreateAccount.php | 2 +- app/Utils/PhantomJS/Phantom.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Account/CreateAccount.php b/app/Jobs/Account/CreateAccount.php index fa867e428c..b175e4365e 100644 --- a/app/Jobs/Account/CreateAccount.php +++ b/app/Jobs/Account/CreateAccount.php @@ -113,7 +113,7 @@ class CreateAccount private function processSettings($settings) { - if(Ninja::isHosted() && Cache::get('currencies') && $data = unserialize(@file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $this->request->getClientIp()))) + if(Ninja::isHosted() && Cache::get('currencies') && $data = unserialize(@file_get_contents('http://www.geoplugin.net/php.gp?ip=' . request()->getClientIp()))) { $currency_code = strtolower($data['geoplugin_currencyCode']); diff --git a/app/Utils/PhantomJS/Phantom.php b/app/Utils/PhantomJS/Phantom.php index d6729e914c..3692099794 100644 --- a/app/Utils/PhantomJS/Phantom.php +++ b/app/Utils/PhantomJS/Phantom.php @@ -118,6 +118,8 @@ class Phantom $finfo = new \finfo(FILEINFO_MIME); +nlog($pdf); + if($finfo->buffer($pdf) != 'application/pdf; charset=binary') { SystemLogger::dispatch(