Trim whitespace from serials when checking out and returning products
This commit is contained in:
parent
4e9e5b93af
commit
ae8b73cb88
@ -87,7 +87,7 @@ class Ajax extends Responder {
|
||||
}
|
||||
$product = null;
|
||||
try {
|
||||
$product = new Product($_POST['product'], 'serial');
|
||||
$product = new Product(trim($_POST['product']), 'serial');
|
||||
} catch(Exception $e) {
|
||||
return new Failure('Ogiltigt serienummer.');
|
||||
}
|
||||
@ -102,7 +102,7 @@ class Ajax extends Responder {
|
||||
private function return_product() {
|
||||
$product = null;
|
||||
try {
|
||||
$product = new Product($_POST['serial'], 'serial');
|
||||
$product = new Product(trim($_POST['serial']), 'serial');
|
||||
} catch(Exception $e) {
|
||||
return new Failure('Ogiltigt serienummer.');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user