Fix for allfinfo and parsStat for non Windows Fileservers

Small update
This commit is contained in:
root 2015-04-03 11:40:04 +02:00
commit 286024db74
2 changed files with 11 additions and 0 deletions

View file

@ -92,6 +92,11 @@ class Parser {
$size = 0;
foreach ($output as $line) {
list($name, $value) = explode(':', $line, 2);
// A line = explode statement may not fill all array elements
// properly. May happen when accessing non Windows Fileservers
$words = explode(':', $line, 2);
$name = isset($words[0]) ? $words[0] : '';
$value = isset($words[1]) ? $words[1] : '';
$value = trim($value);
if ($name === 'write_time') {
$mtime = strtotime($value);