Browse Source

Fixed busines parameter check

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
c4418bf9a9
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/Utils/LuBusiness.php

+ 2
- 2
src/Utils/LuBusiness.php View File

35
      */
35
      */
36
     public static function checkParam($param, $validate = null)
36
     public static function checkParam($param, $validate = null)
37
     {
37
     {
38
-        $value = self::getParam($param);
39
-        if (is_null($value) || trim($value) == '')
38
+        if (!self::hasParam($param))
40
             abort(400, 'Missing parameter: ' . $param);
39
             abort(400, 'Missing parameter: ' . $param);
40
+        $value = self::getParam($param);
41
         if ($validate != null) {
41
         if ($validate != null) {
42
             if (is_callable($validate)) {
42
             if (is_callable($validate)) {
43
                 $validate = $validate($value);
43
                 $validate = $validate($value);

Loading…
Cancel
Save