From 440e8ce8c9abb86065fbdbdfe0417972a3cc17e6 Mon Sep 17 00:00:00 2001 From: Lucas Bickel Date: Fri, 8 Sep 2017 19:53:29 +0200 Subject: [PATCH] Fix legacy constructors These go way back to php 4 and don't need to be like this for any reason. Currently error handling is acting up when these throw an error. --- .../application/cloud_storage/Amazon_S3StorageBackend.php | 2 +- .../application/cloud_storage/FileStorageBackend.php | 7 +------ .../application/cloud_storage/ProxyStorageBackend.php | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php b/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php index c91d9f442..49d0ef230 100644 --- a/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php +++ b/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php @@ -8,7 +8,7 @@ class Amazon_S3StorageBackend extends StorageBackend private $s3Client; private $proxyHost; - public function Amazon_S3StorageBackend($securityCredentials) + public function __construct($securityCredentials) { $this->setBucket($securityCredentials['bucket']); $this->setAccessKey($securityCredentials['api_key']); diff --git a/airtime_mvc/application/cloud_storage/FileStorageBackend.php b/airtime_mvc/application/cloud_storage/FileStorageBackend.php index 1e111daf1..c4d7d653f 100644 --- a/airtime_mvc/application/cloud_storage/FileStorageBackend.php +++ b/airtime_mvc/application/cloud_storage/FileStorageBackend.php @@ -2,11 +2,6 @@ class FileStorageBackend extends StorageBackend { - //Stub class - public function FileStorageBackend() - { - } - public function getAbsoluteFilePath($resourceId) { //TODO @@ -32,4 +27,4 @@ class FileStorageBackend extends StorageBackend { return ""; } -} \ No newline at end of file +} diff --git a/airtime_mvc/application/cloud_storage/ProxyStorageBackend.php b/airtime_mvc/application/cloud_storage/ProxyStorageBackend.php index 849123e98..fa3e7656c 100644 --- a/airtime_mvc/application/cloud_storage/ProxyStorageBackend.php +++ b/airtime_mvc/application/cloud_storage/ProxyStorageBackend.php @@ -14,7 +14,7 @@ class ProxyStorageBackend extends StorageBackend * Receives the file's storage backend and instantiates the appropriate * object. */ - public function ProxyStorageBackend($storageBackend) + public function __construct($storageBackend) { $CC_CONFIG = Config::getConfig();