From e949a5554f94f390c0e672c3b2c0c7c615dbd0e2 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 17 Nov 2022 13:28:31 -0500 Subject: [PATCH] Must convert strings into integers before doing math as of php 8.2 Fixes Unsupported operand types: string - int --- web/api/app/Controller/MonitorsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/api/app/Controller/MonitorsController.php b/web/api/app/Controller/MonitorsController.php index 8e98797da..29efc8e86 100644 --- a/web/api/app/Controller/MonitorsController.php +++ b/web/api/app/Controller/MonitorsController.php @@ -307,8 +307,8 @@ class MonitorsController extends AppController { // In 1.36.16 the values got shifted up so that we could index into an array of strings. // So do a hack to restore the previous behavour $this->set(array( - 'status' => $status-1, - 'output' => $output[0]-1, + 'status' => intval($status)-1, + 'output' => intval($output[0])-1, '_serialize' => array('status','output'), )); } else {