mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-08 00:16:24 +00:00
Validate smsCount and smsDatas field
This commit is contained in:
parent
fa2685f865
commit
f7da068505
@ -104,6 +104,16 @@ class ApiController extends Controller {
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function checkPushStructure ($smsCount, $smsDatas) {
|
private function checkPushStructure ($smsCount, $smsDatas) {
|
||||||
|
if ($smsCount === NULL) {
|
||||||
|
$this->errorMsg = "Error: smsCount field is NULL";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($smsDatas === NULL) {
|
||||||
|
$this->errorMsg = "Error: smsDatas field is NULL";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($smsCount != count($smsDatas)) {
|
if ($smsCount != count($smsDatas)) {
|
||||||
$this->errorMsg = "Error: sms count invalid";
|
$this->errorMsg = "Error: sms count invalid";
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user