mirror of
				https://github.com/nerzhul/ocsms.git
				synced 2025-10-28 00:49:11 +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 | ||||
|      */ | ||||
| 	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)) { | ||||
| 			$this->errorMsg = "Error: sms count invalid"; | ||||
| 			return false; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user