mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 07:26:52 +01:00 
			
		
		
		
	Cast to int
This commit is contained in:
		
							parent
							
								
									375a64a38e
								
							
						
					
					
						commit
						a97341f6f2
					
				| @ -23,7 +23,8 @@ class Endpoint | ||||
|         $this->port = (int) $port; | ||||
| 
 | ||||
|         if (str_contains($port, ':')) { | ||||
|             [$this->ip, $this->port] = explode(':', $port); | ||||
|             [$this->ip, $port] = explode(':', $port); | ||||
|             $this->port = (int) $port; | ||||
|         } | ||||
| 
 | ||||
|         throw_unless(filter_var($this->ip, FILTER_VALIDATE_IP) !== false, new InvalidArgumentException("$this->ip is an invalid IP address")); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Lance Pioch
						Lance Pioch