Fixed no AWS class bug

-> Corrected the file name which caused the AWS class file to not load.
-> Standardized GetError()
This commit is contained in:
Devang Srivastava 2018-03-03 13:32:49 +05:30 committed by GitHub
parent 563e984fdd
commit 26d1b68f84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ class SpacesConnect {
function __construct($access_key, $secret_key, $spaceName = "", $region = "nyc3", $host = "digitaloceanspaces.com") {
//Only pulled if an AWS class doesn't already exist.
$non_composer_aws_lib = dirname(__FILE__)."/aws/autoloader.phpx";
$non_composer_aws_lib = dirname(__FILE__)."/aws/autoloader.php";
if(!empty($spaceName)) {
$endpoint = "https://".$spaceName.".".$region.".".$host;
@ -499,9 +499,6 @@ class SpacesConnect {
throw new SpacesAPIException(@json_encode($error));
}
function GetError($e) {
}
}
/*
@ -512,7 +509,7 @@ class SpacesAPIException extends \Exception {
parent::__construct($message, $code, $previous);
}
public function getError() {
public function GetError() {
$error = @json_decode($this->getMessage(), true);
return $error["error"];
}