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.'); }