Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Fix issue #57: array merge with null (#59)
Browse files Browse the repository at this point in the history
* Fix issue #57: array merge with null

* Space after !
  • Loading branch information
nicja authored Apr 18, 2019
1 parent 81da22a commit 4c112eb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/GoogleCloudStorageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,20 @@ public function boot()
*/
private function createClient($config)
{
if (is_string(array_get($config, 'key_file'))) {
$keyFile = array_get($config, 'key_file');
if (is_string($keyFile)) {
return new StorageClient([
'projectId' => $config['project_id'],
'keyFilePath' => array_get($config, 'key_file'),
'keyFilePath' => $keyFile,
]);
}

if (! is_array($keyFile)) {
$keyFile = [];
}
return new StorageClient([
'projectId' => $config['project_id'],
'keyFile' => array_merge([
"project_id" => $config['project_id']
], array_get($config, 'key_file', []))
'keyFile' => array_merge(["project_id" => $config['project_id']], $keyFile)
]);
}

Expand Down

0 comments on commit 4c112eb

Please sign in to comment.