Skip to content

Commit 156588f

Browse files
committed
be sure folder exists as a value
1 parent 0ffe018 commit 156588f

File tree

1 file changed

+3
-3
lines changed
  • cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php

1 file changed

+3
-3
lines changed

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-media.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ public function editor_assets() {
901901
);
902902

903903
// Set folder if needed.
904-
if ( !empty( $this->cloudinary_folder ) ) {
904+
if ( ! empty( $this->cloudinary_folder ) ) {
905905
$params['mloptions']['folder'] = array( 'path' => $this->cloudinary_folder );
906906
}
907907

@@ -1007,7 +1007,7 @@ public function down_sync_asset() {
10071007
}
10081008
$transformations = $this->get_transformations_from_string( $url );
10091009
if ( ! empty( $transformations ) ) {
1010-
$sync_key .= wp_json_encode( $transformations );
1010+
$sync_key .= wp_json_encode( $transformations );
10111011
$asset['transformations'] = $transformations;
10121012
}
10131013
// Check Format and url extension.
@@ -1274,7 +1274,7 @@ public function setup() {
12741274

12751275
$this->base_url = $this->plugin->components['connect']->api->cloudinary_url( '/' );
12761276
$this->credentials = $this->plugin->components['connect']->get_credentials();
1277-
$this->cloudinary_folder = $this->plugin->config['settings']['sync_media']['cloudinary_folder'];
1277+
$this->cloudinary_folder = $this->plugin->config['settings']['sync_media']['cloudinary_folder'] ? $this->plugin->config['settings']['sync_media']['cloudinary_folder'] : '';
12781278
$this->filter = new Filter( $this );
12791279
$this->upgrade = new Upgrade( $this );
12801280
$this->global_transformations = new Global_Transformations( $this );

0 commit comments

Comments
 (0)