Skip to content

Commit 370ff31

Browse files
committed
validation upload-offset exists
1 parent 91dbfb3 commit 370ff31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Vimeo/Vimeo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ private function perform_upload_tus($file_path, $file_size, $attempt)
615615
if ($response['status'] === 204) {
616616
// If the `upload-offset` returned is equal to the size of the video we want to upload, then we've
617617
// fully uploaded the video. If not, continue uploading.
618-
if ($response['headers']['upload-offset'] === $file_size) {
618+
if (array_key_exists('upload-offset', $response['headers']) && $response['headers']['upload-offset'] === $file_size) {
619619
break;
620620
}
621621

0 commit comments

Comments
 (0)