|
@@ -56,7 +56,7 @@ discard block |
|
|
block discarded – undo |
|
56
|
56
|
public function check() |
|
57
|
57
|
{ |
|
58
|
58
|
// check if user is auth'd or guest name is defined |
|
59
|
|
- if (!App::$User->isAuth() && ((int)$this->_configs['guestAdd'] !== 1 || Str::length($this->guestName) < 2)) { |
|
|
59
|
+ if (!App::$User->isAuth() && ((int) $this->_configs['guestAdd'] !== 1 || Str::length($this->guestName) < 2)) { |
|
60
|
60
|
throw new JsonException(__('Guest name is not defined')); |
|
61
|
61
|
} |
|
62
|
62
|
|
|
@@ -66,7 +66,7 @@ discard block |
|
|
block discarded – undo |
|
66
|
66
|
} |
|
67
|
67
|
|
|
68
|
68
|
// check if message length is correct |
|
69
|
|
- if (Str::length($this->message) < (int)$this->_configs['minLength'] || Str::length($this->message) > (int)$this->_configs['maxLength']) { |
|
|
69
|
+ if (Str::length($this->message) < (int) $this->_configs['minLength'] || Str::length($this->message) > (int) $this->_configs['maxLength']) { |
|
70
|
70
|
throw new JsonException(__('Message length is incorrect. Current: %cur% , min - %min%, max - %max%', [ |
|
71
|
71
|
'cur' => Str::length($this->message), |
|
72
|
72
|
'min' => $this->_configs['minLength'], |
Please login to merge, or discard this patch.