MDL-51531 libraries: Upgrade google libraries to 1.1.5
This commit is contained in:
@@ -15,11 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
|
||||
if (!class_exists('Google_Client')) {
|
||||
require_once dirname(__FILE__) . '/../autoload.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Chirag Shah <[email protected]>
|
||||
*
|
||||
* Manage large file uploads, which may be media but can be any type
|
||||
* of sizable data.
|
||||
*/
|
||||
class Google_Http_MediaFileUpload
|
||||
{
|
||||
@@ -285,7 +287,7 @@ class Google_Http_MediaFileUpload
|
||||
}
|
||||
$message = $code;
|
||||
$body = @json_decode($response->getResponseBody());
|
||||
if (!empty( $body->error->errors ) ) {
|
||||
if (!empty($body->error->errors) ) {
|
||||
$message .= ': ';
|
||||
foreach ($body->error->errors as $error) {
|
||||
$message .= "{$error->domain}, {$error->message};";
|
||||
@@ -297,4 +299,9 @@ class Google_Http_MediaFileUpload
|
||||
$this->client->getLogger()->error($error);
|
||||
throw new Google_Exception($error);
|
||||
}
|
||||
|
||||
public function setChunkSize($chunkSize)
|
||||
{
|
||||
$this->chunkSize = $chunkSize;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user