From 4f8bc9486d905f339b7fdb7bd59f8f52c2b1c199 Mon Sep 17 00:00:00 2001 From: Erik Thuning <boooink@gmail.com> Date: Thu, 8 Feb 2024 15:38:54 +0100 Subject: [PATCH] Fixed the inventory registry field not trimming whitespace --- include/Ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/Ajax.php b/include/Ajax.php index 99abc22..bc4a4cc 100644 --- a/include/Ajax.php +++ b/include/Ajax.php @@ -164,7 +164,7 @@ class Ajax extends Responder { } $product = null; try { - $product = new Product($_POST['serial'], 'serial'); + $product = new Product(trim($_POST['serial']), 'serial'); } catch(Exception $e) { return new Failure('Ogiltigt serienummer.'); }