projects
/
Dyndns
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7a7afa
)
Use preg_match instead of eregi. Fixes #1
author
Nico Kaiser
<nico@kaiser.me>
Fri, 2 Aug 2013 17:04:19 +0000
(19:04 +0200)
committer
Nico Kaiser
<nico@kaiser.me>
Fri, 2 Aug 2013 17:04:19 +0000
(19:04 +0200)
web/lib/Dyndns/Helper.php
patch
|
blob
|
history
diff --git
a/web/lib/Dyndns/Helper.php
b/web/lib/Dyndns/Helper.php
index
9e74115
..
26068ec
100644
(file)
--- a/
web/lib/Dyndns/Helper.php
+++ b/
web/lib/Dyndns/Helper.php
@@
-18,7
+18,7
@@
class Helper
*/
public static function checkValidIp($ip)
{
- if (!
eregi("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$
", $ip))
+ if (!
preg_match("/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/
", $ip))
return false;
$tmp = explode(".", $ip);
@@
-38,7
+38,7
@@
class Helper
*/
public static function checkValidHost($hostname)
{
- return
eregi('^[a-z0-9.-]+$
', $hostname);
+ return
preg_match('/^[a-z0-9.-]+$/
', $hostname);
}
/**