Skip to content

Commit cd38003

Browse files
committed
return not synced if exeeding
1 parent 1208e26 commit cd38003

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)