summaryrefslogtreecommitdiff
path: root/includes/pages/admin_rooms.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-08-29 16:21:25 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-08-29 21:52:07 +0200
commitcc01c906ba63b3797bf2b9ef92a6854fe2ddbefb (patch)
treeea819678100f6a50d67f1f8516e82fdef8a9196b /includes/pages/admin_rooms.php
parent73175e2b64c85c7a8c528c76452cd82ffa99f925 (diff)
#336: Integration of symfony/http-foundation request
Diffstat (limited to 'includes/pages/admin_rooms.php')
-rw-r--r--includes/pages/admin_rooms.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php
index 8a7720d8..457114a0 100644
--- a/includes/pages/admin_rooms.php
+++ b/includes/pages/admin_rooms.php
@@ -110,11 +110,14 @@ function admin_rooms()
}
foreach ($angeltypes as $angeltype_id => $angeltype) {
- if (
- $request->has('angeltype_count_' . $angeltype_id)
- && preg_match('/^\d{1,4}$/', $request->input('angeltype_count_' . $angeltype_id))
- ) {
- $angeltypes_count[$angeltype_id] = $request->input('angeltype_count_' . $angeltype_id);
+ $angeltypes_count[$angeltype_id] = 0;
+ $queryKey = 'angeltype_count_' . $angeltype_id;
+ if (!$request->has($queryKey)) {
+ continue;
+ }
+
+ if (preg_match('/^\d{1,4}$/', $request->input($queryKey))) {
+ $angeltypes_count[$angeltype_id] = $request->input($queryKey);
} else {
$valid = false;
$msg .= error(sprintf(_('Please enter needed angels for type %s.'), $angeltype), true);