mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-21 10:15:01 -04:00
fix(controllers): validate default stock location ID before setting it
Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
This commit is contained in:
1 parent
b14492c850
commit
fa9bc0bbf3
1 file changed
+1
-1
@@ -786,7 +786,7 @@ class Config extends Secure_Controller
|
||||
}
|
||||
|
||||
$defaultLocationId = $this->request->getPost('stock_location_default', FILTER_SANITIZE_NUMBER_INT);
|
||||
if ($defaultLocationId) {
|
||||
if ($defaultLocationId && in_array((int) $defaultLocationId, array_map('intval', $notToDelete), true)) {
|
||||
$this->stock_location->setDefaultLocation((int) $defaultLocationId);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user