src: tweak previous, php can be picky

This commit is contained in:
Franco Fichtner 2016-02-18 08:33:34 +01:00
parent 61cb3745be
commit 93c20e1b69
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ while (true) {
$string = fgets($handle, 256);
$elements = array();
$elements = preg_split(":", $string, null);
$elements = preg_split('/:/', $string);
$elements[0] = trim($elements[0]);
$elements[1] = trim($elements[1]);
@ -60,7 +60,7 @@ while (true) {
break;
case "^DSFLOWRPT":
$items = array();
$items = preg_split(",", $elements[1], null);
$items = preg_split('/,/', $elements[1]);
$record['time'] = hexdec($items[0]);
$record['upstream'] = round((floatval(hexdec($items[1])) * 8) /1024);
$record['downstream'] = round((floatval(hexdec($items[2])) * 8) /1024);

View File

@ -55,7 +55,7 @@ if ($_REQUEST['getdyndnsstatus']) {
$filename = "/conf/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
if (file_exists($filename)) {
$ipaddr = dyndnsCheckIP($dyndns['interface']);
$cached_ip_s = preg_split(":", file_get_contents($filename), null);
$cached_ip_s = preg_split('/:/', file_get_contents($filename));
$cached_ip = $cached_ip_s[0];
if ($ipaddr <> $cached_ip) {
echo "<font color='red'>";