address Scrutinizer warning

> The variable $bucket does not seem to be defined for all execution paths leading up to this point.
pull/1014/head
El RIDO 2022-11-05 09:35:06 +01:00
parent 62bb68344c
commit 833cf93209
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
1 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,9 @@ class GoogleCloudStorage extends AbstractData
$this->_client = class_exists('StorageClientStub', false) ?
new \StorageClientStub(array()) :
new StorageClient(array('suppressKeyFileNotice' => true));
$this->_bucket = $this->_client->bucket($bucket);
if (isset($bucket)) {
$this->_bucket = $this->_client->bucket($bucket);
}
}
/**