Skip to content

Commit bb55a9a

Browse files
committed
fix for ZIP archive downloads
1 parent 60d2746 commit bb55a9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

php/fotolia-api.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,9 @@ public function downloadMedia($download_url, $output_file = NULL)
359359
}
360360
}
361361

362-
throw new Fotolia_Api_Exception('Unknown API error');
362+
if ($http_code != 200) {
363+
throw new Fotolia_Api_Exception('Unknown API error');
364+
}
363365
} elseif ($http_code != 200) {
364366
throw new Fotolia_Api_Exception('Invalid response HTTP code: ' . $http_code);
365367
}

0 commit comments

Comments
 (0)