mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-10-01 09:04:07 +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;
|
$data[$name] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$attributeStart = strpos($data['attributes'], '(');
|
$attributeStart = isset($data['attributes']) ? strpos($data['attributes'], '(') : false;
|
||||||
if ($attributeStart === 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 [
|
return [
|
||||||
'mtime' => (int)strtotime($data['write_time']),
|
'mtime' => (int)strtotime($data['write_time']),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue