Skip to content

Commit 8858f4d

Browse files
authored
valid_ip: Added empty($ip) returning false
as is in valid_url
1 parent 61319c6 commit 8858f4d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

system/Validation/FormatRules.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,11 @@ public function valid_emails(string $str = null): bool
349349
* @return boolean
350350
*/
351351
public function valid_ip(string $ip = null, string $which = null): bool
352-
{
352+
{
353+
if(empty($ip))
354+
{
355+
return false;
356+
}
353357
switch (strtolower($which))
354358
{
355359
case 'ipv4':

0 commit comments

Comments
 (0)