File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ public function is_synced( $post_id ) {
103103 $ return = false ;
104104 $ signature = $ this ->get_signature ( $ post_id );
105105 $ expecting = $ this ->generate_signature ( $ post_id );
106- if ( ! empty ( $ signature ) && $ expecting === $ signature ) {
106+ if ( ! empty ( $ signature ) && ! empty ( $ expecting ) && $ expecting === $ signature ) {
107107 $ return = $ signature ;
108108 }
109109
@@ -122,6 +122,7 @@ public function generate_signature( $post_id ) {
122122 // Check if has an error (ususally due to file quotas).
123123 if ( is_wp_error ( $ upload ) ) {
124124 $ this ->plugin ->components ['media ' ]->get_post_meta ( $ post_id , self ::META_KEYS ['sync_error ' ], $ upload ->get_error_message () );
125+
125126 return false ;
126127 }
127128 $ credentials = $ this ->plugin ->components ['connect ' ]->get_credentials ();
You can’t perform that action at this time.
0 commit comments