mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
require php5.6+
This commit is contained in:
parent
f258947a6f
commit
0cbfd0872d
5 changed files with 47 additions and 37 deletions
|
|
@ -10,6 +10,7 @@ namespace Icewind\SMB;
|
|||
|
||||
|
||||
use Icewind\SMB\Exception\Exception;
|
||||
use Icewind\SMB\Exception\RevisionMismatchException;
|
||||
|
||||
class NotifyHandler implements INotifyHandler {
|
||||
/**
|
||||
|
|
@ -24,10 +25,9 @@ class NotifyHandler implements INotifyHandler {
|
|||
|
||||
private $listening = true;
|
||||
|
||||
// todo replace with static once <5.6 support is dropped
|
||||
// see error.h
|
||||
private static $exceptionMap = [
|
||||
ErrorCodes::RevisionMismatch => '\Icewind\SMB\Exception\RevisionMismatchException',
|
||||
const EXCEPTION_MAP = [
|
||||
ErrorCodes::RevisionMismatch => RevisionMismatchException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -93,7 +93,7 @@ class NotifyHandler implements INotifyHandler {
|
|||
private function checkForError($line) {
|
||||
if (substr($line, 0, 16) === 'notify returned ') {
|
||||
$error = substr($line, 16);
|
||||
throw Exception::fromMap(self::$exceptionMap, $error, 'Notify is not supported with the used smb version');
|
||||
throw Exception::fromMap(array_merge(self::EXCEPTION_MAP, Parser::EXCEPTION_MAP), $error, 'Notify is not supported with the used smb version');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue