January 25, 20206 yr My shop version 1.1.x Bleeding Edge last release The error log shows the following 2020/01/25 14:02:54 [error] 688#688: *1436 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined variable: currency in /home/vagrant/public_html/controllers/admin/AdminOrdersController.php on line 2713PHP message: PHP Notice: Trying to get property 'decimals' of non-object in /home/vagrant/public_html/controllers/admin/AdminOrdersController.php on line 2713"
January 26, 20206 yr Nice catch. That's when attempting to edit a product in an order in back office, bottommost panel, right? I'm just curious how you managed to get this error message, I don't get it. Which kind of PHP is this? Anyways, this small patch should fix it: diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index b04f824fb9..100813972a 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -2710,7 +2710,7 @@ class AdminOrdersControllerCore extends AdminController } $decimals = 0; - if ($currency->decimals) { + if ($this->context->currency->decimals) { $decimals = Configuration::get('PS_PRICE_DISPLAY_PRECISION'); } $this->ajaxDie(json_encode([
January 28, 20206 yr Author On 1/26/2020 at 3:10 PM, Traumflug said: Nice catch. That's when attempting to edit a product in an order in back office, bottommost panel, right? Yes. On 1/26/2020 at 3:10 PM, Traumflug said: I'm just curious how you managed to get this error message, I don't get it. Which kind of PHP is this? My currently php version: PHP 7.3.10-1+0~20191008.45+debian9~1.gbp365209 (cli) (built: Oct 8 2019 05:48:14) ( NTS )
Create an account or sign in to comment