mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 09:14:06 +02:00
php5 compatibility
This commit is contained in:
parent
523d1bcc12
commit
9a6fbed231
1 changed files with 16 additions and 15 deletions
|
|
@ -115,13 +115,14 @@ class NativeShare extends AbstractShare {
|
|||
/**
|
||||
* Multibyte unicode safe version of basename()
|
||||
*
|
||||
* @param string $path
|
||||
* @link http://php.net/manual/en/function.basename.php#121405
|
||||
* @return string
|
||||
*/
|
||||
protected static function mb_basename($path): string
|
||||
{
|
||||
protected static function mb_basename($path) {
|
||||
if (preg_match('@^.*[\\\\/]([^\\\\/]+)$@s', $path, $matches)) {
|
||||
return $matches[1];
|
||||
} else if (preg_match('@^([^\\\\/]+)$@s', $path, $matches)) {
|
||||
} elseif (preg_match('@^([^\\\\/]+)$@s', $path, $matches)) {
|
||||
return $matches[1];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue