Skip to content

Commit 2db25ea

Browse files
committed
fix code from last merge
1 parent d62a611 commit 2db25ea

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

php/fotolia-api.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public function downloadMediaComp($download_url, $output_file = NULL)
336336
* @param string $output_file if null the downloaded file will be echoed on standard output
337337
* @param bool $http_auth set curl password if needed
338338
*/
339-
private function _download($download_url, $output_file = NULL, $http_auth = true)
339+
private function _download($download_url, $output_file = NULL, $http_auth_required = true)
340340
{
341341
$ch = $this->_getCurlHandler($download_url);
342342

@@ -350,9 +350,7 @@ private function _download($download_url, $output_file = NULL, $http_auth = true
350350
}
351351

352352
curl_setopt($ch, CURLOPT_FILE, $output_fd);
353-
if ($http_auth) {
354-
curl_setopt($ch, CURLOPT_USERPWD, $this->_getHttpAuth(TRUE, TRUE));
355-
}
353+
curl_setopt($ch, CURLOPT_USERPWD, $this->_getHttpAuth(TRUE, $http_auth_required));
356354

357355
$response = curl_exec($ch);
358356

0 commit comments

Comments
 (0)