Skip to content

Commit

Permalink
* Fix redeclared function error when using as a composer dependency
Browse files Browse the repository at this point in the history
* Fix for bug introduced 4.2.2
  • Loading branch information
jawngee committed Feb 10, 2021
1 parent ef719f0 commit bbeff08
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
11 changes: 2 additions & 9 deletions classes/Tools/ToolsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
use MediaCloud\Plugin\Tools\Network\NetworkTool ;
use MediaCloud\Plugin\Utilities\Environment ;
use MediaCloud\Plugin\Utilities\LicensingManager ;
use MediaCloud\Plugin\Utilities\Logging\Logger ;
use MediaCloud\Plugin\Utilities\NoticeManager ;
use MediaCloud\Plugin\Utilities\Tracker ;
use MediaCloud\Plugin\Utilities\View ;
use function MediaCloud\Plugin\Utilities\arrayPath ;
use function MediaCloud\Plugin\Utilities\json_response ;
use MediaCloud\Plugin\Wizard\SetupWizard ;
use function MediaCloud\Plugin\Utilities\vomit ;

if ( !defined( 'ABSPATH' ) ) {
header( 'Location: /' );
Expand Down Expand Up @@ -66,7 +68,6 @@ final class ToolsManager
//region Constructor
public function __construct()
{
// MigrationsManager::instance()->migrate();
$this->tools = [];
if ( class_exists( '\\hyperdb' ) || class_exists( '\\LudicrousDB' ) ) {
add_filter(
Expand All @@ -75,17 +76,9 @@ function ( $value, $option, $old_value ) {

if ( empty($value) && strpos( $option, 'mcloud' ) === 0 ) {
$type = strtolower( gettype( $value ) );

if ( in_array( $type, [ 'boolean', 'null' ] ) ) {
Logger::info(
"pre_update_option: Empty {$option} => " . $type,
[],
__METHOD__,
__LINE__
);
return (string) '0';
}

}

return $value;
Expand Down
4 changes: 4 additions & 0 deletions classes/Utilities/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

if (!defined('ABSPATH') && empty($GLOBALS['__composer_autoload_files'])) { header('Location: /'); die; }

if (function_exists('\MediaCloud\Plugin\Utilities\vomit')) {
return;
}

/**
* Brute force debug tool
* @param $what
Expand Down
4 changes: 2 additions & 2 deletions ilab-media-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Plugin URI: https://github.com/interfacelab/ilab-media-tools
Description: Automatically upload media to Amazon S3 and integrate with Imgix, a real-time image processing CDN. Boosts site performance and simplifies workflows.
Author: interfacelab
Version: 4.2.2
Version: 4.2.3
Author URI: http://interfacelab.io
*/
// Copyright (c) 2016 Interfacelab LLC. All rights reserved.
Expand Down Expand Up @@ -94,7 +94,7 @@
}

// Version Defines
define( 'MEDIA_CLOUD_VERSION', '4.2.2' );
define( 'MEDIA_CLOUD_VERSION', '4.2.3' );
define( 'MEDIA_CLOUD_INFO_VERSION', '4.0.2' );
define( 'MCLOUD_IS_BETA', false );
// Directory defines
Expand Down
6 changes: 4 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Requires at least: 4.9
Tested up to: 5.6.1
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable tag: 4.2.2
Stable tag: 4.2.3
Requires PHP: 7.1

Automatically store media on Amazon S3, Google Cloud Storage, DigitalOcean Spaces + others. Serve CSS/JS assets through CDNs. Integrate with Imgix.
Expand Down Expand Up @@ -105,8 +105,10 @@ Imgix is a content delivery network with a twist. In addition to distributing y

== Changelog ==

= 4.2.2 =
= 4.2.3 =

* Fix redeclared function error when using as a composer dependency
* Fix for bug introduced 4.2.2
* Fix for PHP 7.4 type errors
* Fix for incorrect imgix URL generation
* Massive overhaul of Elementor integration. Media Cloud now will support any Elementor addon and running the
Expand Down

0 comments on commit bbeff08

Please sign in to comment.