diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-12-18 13:48:46 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-12-18 13:48:46 +0100 |
commit | 9a15fbc71e296d7810984455aa7dc19503f89de3 (patch) | |
tree | 0f8c2237a80aae37ef7cf40437cd68d49398cf72 /includes | |
parent | 204ff4c0e79fab0d1f73daa29a026582efffee69 (diff) |
worklog: Fix hours validation
closes #527 (Worklog entries with floating point numbers with a comma dispatches a team of untrained monkeys)
Diffstat (limited to 'includes')
-rw-r--r-- | includes/controller/user_worklog_controller.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/controller/user_worklog_controller.php b/includes/controller/user_worklog_controller.php index bf0eb1cf..7cedea92 100644 --- a/includes/controller/user_worklog_controller.php +++ b/includes/controller/user_worklog_controller.php @@ -82,7 +82,7 @@ function user_worklog_from_request($userWorkLog) } $userWorkLog['work_hours'] = $request->input('work_hours'); - if (!preg_match("/[0-9]+(\.[0-9]+)?/", $userWorkLog['work_hours'])) { + if (!preg_match("/^[0-9]+(\.[0-9]+)?$/", $userWorkLog['work_hours'])) { $valid = false; error(__('Please enter work hours in format ##[.##].')); } |