diff --git a/docker-data/php/override.ini b/docker-data/php/override.ini index 5713fb6..dce7a54 100644 --- a/docker-data/php/override.ini +++ b/docker-data/php/override.ini @@ -1,2 +1,2 @@ [Date] -date.timezone = UTC \ No newline at end of file +date.timezone = "UTC" \ No newline at end of file diff --git a/receive.php b/receive.php index 6167ef6..3e8bf00 100644 --- a/receive.php +++ b/receive.php @@ -1,9 +1,9 @@ getUUID(),$sms->getNumber(),$sms->getTime(),$sms->getMessage(),$sms->getIPAddress()); /** diff --git a/scan.php b/scan.php index 5579f27..be84c64 100644 --- a/scan.php +++ b/scan.php @@ -49,7 +49,7 @@ checkbikeno($bikeno); if (!empty($_POST['rent']) && $_POST['rent'] == "yes") { $result = $rentSystem->rentBike($userid, $bikeno); - response($result['message'], $result['error'], 0); + response($result['content'], $result['error'], 0); } else { showrentform($userid, $bikeno); } @@ -59,7 +59,7 @@ $stand = $parameter; checkstandname($stand); $result = $rentSystem->returnBike($userid, 0, $stand); - response($result['message'], $result['error'], 0); + response($result['content'], $result['error'], 0); break; default: unrecognizedqrcode(); diff --git a/src/Rent/RentSystemSms.php b/src/Rent/RentSystemSms.php index e461fa1..eadaab8 100644 --- a/src/Rent/RentSystemSms.php +++ b/src/Rent/RentSystemSms.php @@ -72,6 +72,8 @@ public function returnBike($number, $bikeId, $standName, $note = '', $force = fa if (preg_match("/return[\s,\.]+[0-9]+[\s,\.]+[a-zA-Z0-9]+[\s,\.]+(.*)/i", $note, $matches)) { $note = $this->db->escape(trim($matches[1])); + } else { + $note = ''; } return parent::returnBike($userId, $bikeId, $standName, $note, $force);