mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
f510130797
commit
6973b04211
@ -184,7 +184,8 @@ class Reader implements DatasourceInterface
|
||||
$PHP_EOL_len = strlen(PHP_EOL);
|
||||
$lines = array();
|
||||
$s = '';
|
||||
$f = fopen($this->filename, 'rb');
|
||||
$f = @fopen($this->filename, 'rb');
|
||||
if ($f !== false) {
|
||||
$buffer = '';
|
||||
fseek($f, 0, SEEK_END);
|
||||
if (ftell($f) === 0) {
|
||||
@ -212,6 +213,7 @@ class Reader implements DatasourceInterface
|
||||
$s = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
return $lines;
|
||||
}
|
||||
|
||||
@ -252,7 +254,8 @@ class Reader implements DatasourceInterface
|
||||
$PHP_EOL_len = strlen(PHP_EOL);
|
||||
$lines = array();
|
||||
$s = '';
|
||||
$f = fopen($this->filename, 'rb');
|
||||
$f = @fopen($this->filename, 'rb');
|
||||
if ($f !== false) {
|
||||
$buffer = '';
|
||||
while ($read_lines === null || count($lines) < $read_lines) {
|
||||
if (strlen($buffer) === 0) {
|
||||
@ -279,6 +282,7 @@ class Reader implements DatasourceInterface
|
||||
$s = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
return $lines;
|
||||
}
|
||||
|
||||
@ -293,7 +297,8 @@ class Reader implements DatasourceInterface
|
||||
$PHP_EOL_len = strlen(PHP_EOL);
|
||||
$lines = 0;
|
||||
$s = '';
|
||||
$f = fopen($this->filename, 'rb');
|
||||
$f = @fopen($this->filename, 'rb');
|
||||
if ($f !== false) {
|
||||
$buffer = '';
|
||||
while (true) {
|
||||
if (strlen($buffer) === 0) {
|
||||
@ -314,6 +319,7 @@ class Reader implements DatasourceInterface
|
||||
$s = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
return $lines;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user