mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-10-01 00:54:06 +02:00
fix: Add a bit more information when unable to parse smb stat
This commit is contained in:
parent
a9fcbd8484
commit
84a0d81e5e
1 changed files with 6 additions and 2 deletions
|
|
@ -154,9 +154,13 @@ final class Parser {
|
|||
$data[$name] = $value;
|
||||
}
|
||||
}
|
||||
$attributeStart = strpos($data['attributes'], '(');
|
||||
$attributeStart = isset($data['attributes']) ? strpos($data['attributes'], '(') : false;
|
||||
if ($attributeStart === false) {
|
||||
throw new Exception("Malformed state response from server");
|
||||
throw new Exception(sprintf(
|
||||
"Malformed state response from server, attributes field %s: %s",
|
||||
isset($data['attributes']) ? "'" . $data['attributes'] . "'" : 'missing',
|
||||
implode("\n", $output)
|
||||
));
|
||||
}
|
||||
return [
|
||||
'mtime' => (int)strtotime($data['write_time']),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue