Skip to content

Commit

Permalink
Merge pull request #33 from owncloud/fixing-3466
Browse files Browse the repository at this point in the history
smb4php: - initialize $stat with false - fix regex for connection failed
  • Loading branch information
icewind1991 committed Jun 7, 2013
2 parents d59b017 + 5857af7 commit 3ef9f73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions smb4php/smb.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function client ($params, $purl) {
'^(.*): ERRSRV - ERRbadpw' => 'error',
'^Error returning browse list: (.*)$' => 'error',
'^tree connect failed: (.*)$' => 'error',
'^(Connection to .* failed)$' => 'error',
'^(Connection to .* failed)(.*)$' => 'error-connect',
'^NT_STATUS_(.*) ' => 'error',
'^NT_STATUS_(.*)\$' => 'error',
'ERRDOS - ERRbadpath \((.*).\)' => 'error',
Expand Down Expand Up @@ -185,6 +185,8 @@ function client ($params, $purl) {
return false;
}
trigger_error($regs[0].' params('.$params.')', E_USER_ERROR);
case 'error-connect':
return false;
}
if ($i) switch ($i[1]) {
case 'file':
Expand Down Expand Up @@ -214,7 +216,7 @@ function url_stat ($url, $flags = STREAM_URL_STAT_LINK) {
if ($s = smb::getstatcache($url)) {
return $s;
}
list ($stat, $pu) = array (array (), smb::parse_url ($url));
list ($stat, $pu) = array (false, smb::parse_url ($url));
switch ($pu['type']) {
case 'host':
if ($o = smb::look ($pu))
Expand Down

0 comments on commit 3ef9f73

Please sign in to comment.