summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/amazons3.php4
-rw-r--r--apps/files_external/lib/config.php4
-rw-r--r--apps/files_external/lib/smb_oc.php2
3 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index b956a607eba..40f07b2b22a 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -122,7 +122,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
$params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region'];
$params['hostname'] = empty($params['hostname']) ? 's3.amazonaws.com' : $params['hostname'];
if (!isset($params['port']) || $params['port'] === '') {
- $params['port'] = ($params['use_ssl'] === 'false') ? 80 : 443;
+ $params['port'] = ($params['use_ssl'] === false) ? 80 : 443;
}
$this->params = $params;
}
@@ -585,7 +585,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return $this->connection;
}
- $scheme = ($this->params['use_ssl'] === 'false') ? 'http' : 'https';
+ $scheme = ($this->params['use_ssl'] === false) ? 'http' : 'https';
$base_url = $scheme . '://' . $this->params['hostname'] . ':' . $this->params['port'] . '/';
$this->connection = S3Client::factory(array(
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 390f51bfa71..2a523144f7f 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -231,7 +231,9 @@ class OC_Mount_Config {
}
}
} else {
- $input = str_replace('$user', $user, $input);
+ if (is_string($input)) {
+ $input = str_replace('$user', $user, $input);
+ }
}
return $input;
}
diff --git a/apps/files_external/lib/smb_oc.php b/apps/files_external/lib/smb_oc.php
index 52b73c46ff9..547caa5ecbf 100644
--- a/apps/files_external/lib/smb_oc.php
+++ b/apps/files_external/lib/smb_oc.php
@@ -39,7 +39,7 @@ class SMB_OC extends SMB {
public function __construct($params) {
if (isset($params['host'])) {
$host = $params['host'];
- $this->username_as_share = ($params['username_as_share'] === 'true');
+ $this->username_as_share = ($params['username_as_share'] === true);
// dummy credentials, unused, to satisfy constructor
$user = 'foo';