summaryrefslogtreecommitdiffstats
path: root/apps/files_external/ajax/google.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/ajax/google.php')
-rw-r--r--apps/files_external/ajax/google.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_external/ajax/google.php b/apps/files_external/ajax/google.php
index b80f24bbd2c..66c244acfbc 100644
--- a/apps/files_external/ajax/google.php
+++ b/apps/files_external/ajax/google.php
@@ -10,9 +10,9 @@ $l = \OC::$server->getL10N('files_external');
if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST['redirect'])) {
$client = new Google_Client();
- $client->setClientId($_POST['client_id']);
- $client->setClientSecret($_POST['client_secret']);
- $client->setRedirectUri($_POST['redirect']);
+ $client->setClientId((string)$_POST['client_id']);
+ $client->setClientSecret((string)$_POST['client_secret']);
+ $client->setRedirectUri((string)$_POST['redirect']);
$client->setScopes(array('https://www.googleapis.com/auth/drive'));
$client->setAccessType('offline');
if (isset($_POST['step'])) {
@@ -30,7 +30,7 @@ if (isset($_POST['client_id']) && isset($_POST['client_secret']) && isset($_POST
}
} else if ($step == 2 && isset($_POST['code'])) {
try {
- $token = $client->authenticate($_POST['code']);
+ $token = $client->authenticate((string)$_POST['code']);
OCP\JSON::success(array('data' => array(
'token' => $token
)));