Browse code

Fixed mx-priority can be 0 (and typo in error handling)

Bernd Wurst authored on 04/01/2019 15:37:42
Showing 1 changed files
... ...
@@ -271,8 +271,8 @@ function save_dns_record($id, $record)
271 271
     case 'mx':
272 272
       $record['dyndns'] = null;
273 273
       $record['spec'] = (int) $record['spec'];
274
-      if ($record['spec'] < 1) {
275
-          systen_failure("invalid priority");
274
+      if ($record['spec'] < 0) {
275
+          system_failure("invalid priority");
276 276
       }
277 277
       verify_input_hostname($record['data']);
278 278
       if (! $record['data']) {