Skip to content

Commit

Permalink
Fixed an issue that could prevent certain tasks from running.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawngee committed Feb 26, 2022
1 parent 920134c commit 3b4a868
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 36 deletions.
2 changes: 1 addition & 1 deletion classes/Tools/Storage/CLI/StorageCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ public function syncLocal( $args, $assoc_args )
}
$allSizes = ilab_get_image_sizes();
$sizeKeys = array_keys( $allSizes );
$sizeKeys = array_sort( $sizeKeys );
sort( $sizeKeys );
$sizeKeysLocal = [];
foreach ( $sizeKeys as $key ) {
$sizeKeysLocal[] = $key;
Expand Down
4 changes: 2 additions & 2 deletions classes/Tools/Storage/StorageTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -5159,7 +5159,7 @@ public function verifyPost(
$client = new Client();
$allSizes = ilab_get_image_sizes();
$sizeKeys = array_keys( $allSizes );
$sizeKeys = array_sort( $sizeKeys );
sort( $sizeKeys );
$sizesData = [];
foreach ( $sizeKeys as $key ) {
if ( $includeLocal ) {
Expand Down Expand Up @@ -5476,7 +5476,7 @@ public function syncLocal( $postId, $reporter, $infoCallback )
$client = new Client();
$allSizes = ilab_get_image_sizes();
$sizeKeys = array_keys( $allSizes );
$sizeKeys = array_sort( $sizeKeys );
sort( $sizeKeys );
$sizesData = [];
foreach ( $sizeKeys as $key ) {
$sizesData[$key] = null;
Expand Down
2 changes: 1 addition & 1 deletion classes/Tools/Storage/Tasks/SyncLocalTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function reporter() {
if (empty($this->reportHeaders)) {
$allSizes = ilab_get_image_sizes();
$sizeKeys = array_keys($allSizes);
$sizeKeys = array_sort($sizeKeys);
sort($sizeKeys);
$sizeKeysLocal = [];
foreach($sizeKeys as $key) {
$sizeKeysLocal[] = $key;
Expand Down
2 changes: 1 addition & 1 deletion classes/Tools/Storage/Tasks/UnlinkTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function reporter() {
if (empty($this->reportHeaders)) {
$allSizes = ilab_get_image_sizes();
$sizeKeys = array_keys($allSizes);
$sizeKeys = array_sort($sizeKeys);
sort($sizeKeys);

$this->reportHeaders = [
'Post ID',
Expand Down
2 changes: 1 addition & 1 deletion classes/Tools/Storage/Tasks/VerifyLibraryTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function reporter() {
if (empty($this->reportHeaders)) {
$allSizes = ilab_get_image_sizes();
$sizeKeys = array_keys($allSizes);
$sizeKeys = array_sort($sizeKeys);
sort($sizeKeys);

$fields = [
'Post ID',
Expand Down
4 changes: 2 additions & 2 deletions composer.json
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
],
"config": {
"platform": {
"php": "7.4"
"php": "7.1"
}
},
"require" : {
"php": ">=7.4",
"php": ">=7.1",
"yuloh/bccomp-polyfill": "dev-master"
},
"autoload": {
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.3.1
Version: 4.3.2
Requires PHP: 7.4
Author URI: http://interfacelab.io
*/
Expand Down Expand Up @@ -95,7 +95,7 @@
}

// Version Defines
define( 'MEDIA_CLOUD_VERSION', '4.3.1' );
define( 'MEDIA_CLOUD_VERSION', '4.3.2' );
define( 'MEDIA_CLOUD_INFO_VERSION', '4.0.2' );
define( 'MCLOUD_IS_BETA', false );
// Directory defines
Expand Down
4 changes: 2 additions & 2 deletions lib/mcloud-symfony/polyfill-intl-idn/bootstrap80.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
}

if (!function_exists('idn_to_ascii')) {
function idn_to_ascii(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_ascii((string) $domain, (int) $flags, (int) $variant, $idna_info); }
function idn_to_ascii(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_ascii((string) $domain, (int) $flags, (int) $variant, $idna_info); }
}
if (!function_exists('idn_to_utf8')) {
function idn_to_utf8(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_utf8((string) $domain, (int) $flags, (int) $variant, $idna_info); }
function idn_to_utf8(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_utf8((string) $domain, (int) $flags, (int) $variant, $idna_info); }
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); }
}
if (!function_exists('normalizer_normalize')) {
function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string|false { return p\Normalizer::normalize((string) $string, (int) $form); }
function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize((string) $string, (int) $form); }
}
42 changes: 21 additions & 21 deletions lib/mcloud-symfony/polyfill-mbstring/bootstrap80.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Symfony\Polyfill\Mbstring as p;

if (!function_exists('mb_convert_encoding')) {
function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }
function mb_convert_encoding($string, ?string $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }
}
if (!function_exists('mb_decode_mimeheader')) {
function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); }
Expand All @@ -30,10 +30,10 @@ function mb_encode_numericentity(?string $string, array $map, ?string $encoding
function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); }
}
if (!function_exists('mb_internal_encoding')) {
function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); }
function mb_internal_encoding(?string $encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); }
}
if (!function_exists('mb_language')) {
function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); }
function mb_language(?string $language = null) { return p\Mbstring::mb_language($language); }
}
if (!function_exists('mb_list_encodings')) {
function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); }
Expand All @@ -42,13 +42,13 @@ function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); }
function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); }
}
if (!function_exists('mb_check_encoding')) {
function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); }
function mb_check_encoding($value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); }
}
if (!function_exists('mb_detect_encoding')) {
function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); }
function mb_detect_encoding(?string $string, $encodings = null, ?bool $strict = false) { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); }
}
if (!function_exists('mb_detect_order')) {
function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); }
function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
}
if (!function_exists('mb_parse_str')) {
function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; }
Expand All @@ -57,7 +57,7 @@ function mb_parse_str(?string $string, &$result = []): bool { parse_str((string)
function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); }
}
if (!function_exists('mb_strpos')) {
function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null) { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_strtolower')) {
function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); }
Expand All @@ -66,37 +66,37 @@ function mb_strtolower(?string $string, ?string $encoding = null): string { retu
function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); }
}
if (!function_exists('mb_substitute_character')) {
function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); }
function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); }
}
if (!function_exists('mb_substr')) {
function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); }
}
if (!function_exists('mb_stripos')) {
function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null) { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_stristr')) {
function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null) { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strrchr')) {
function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null) { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strrichr')) {
function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null) { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_strripos')) {
function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null) { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_strrpos')) {
function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null) { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
}
if (!function_exists('mb_strstr')) {
function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null) { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
}
if (!function_exists('mb_get_info')) {
function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); }
function mb_get_info(?string $type = 'all') { return p\Mbstring::mb_get_info((string) $type); }
}
if (!function_exists('mb_http_output')) {
function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); }
function mb_http_output(?string $encoding = null) { return p\Mbstring::mb_http_output($encoding); }
}
if (!function_exists('mb_strwidth')) {
function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); }
Expand All @@ -108,18 +108,18 @@ function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding =
function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); }
}
if (!function_exists('mb_http_input')) {
function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); }
function mb_http_input(?string $type = null) { return p\Mbstring::mb_http_input($type); }
}

if (!function_exists('mb_convert_variables')) {
function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); }
function mb_convert_variables(?string $to_encoding, $from_encoding, mixed &$var, mixed &...$vars) { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); }
}

if (!function_exists('mb_ord')) {
function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); }
function mb_ord(?string $string, ?string $encoding = null) { return p\Mbstring::mb_ord((string) $string, $encoding); }
}
if (!function_exists('mb_chr')) {
function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); }
function mb_chr(?int $codepoint, ?string $encoding = null) { return p\Mbstring::mb_chr((int) $codepoint, $encoding); }
}
if (!function_exists('mb_scrub')) {
function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); }
Expand Down
5 changes: 3 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.9.1
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable tag: 4.3.1
Stable tag: 4.3.2
Requires PHP: 7.4

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,9 +105,10 @@ Imgix is a content delivery network with a twist. In addition to distributing y

== Changelog ==

= 4.3.1 - 2/24/2022 =
= 4.3.2 - 2/26/2022 =

* **NOW REQUIRES PHP 7.4** Installing on PHP < 7.4 will not work and result in errors.
* Fixed an issue that would prevent certain tasks from running
* Sign up to be notified about our new product for WordPress coming in April 2022: [Preflight for WordPress](https://preflight.ju.mp)
* Fixed compatibility with BuddyPress 6.x
* Fixed compatibility with BuddyBoss 1.8.x including video. **Note:** Mux encoding does not work with BuddyBoss and it's impossible to make it work. You can have it enabled and Mux will encode videos but the videos that are played on the front end will be the uploaded MP4 source. It's best to turn Mux off if you are using it with BuddyBoss.
Expand Down

0 comments on commit 3b4a868

Please sign in to comment.