[PATCH 3/3] Explicit error when curl_exec() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Matthieu Moy <Matthieu.Moy@xxxxxxx>
---
 contrib/mw-to-git/t/install-wiki/db_install.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/mw-to-git/t/install-wiki/db_install.php b/contrib/mw-to-git/t/install-wiki/db_install.php
index b34772a..99d24e0 100644
--- a/contrib/mw-to-git/t/install-wiki/db_install.php
+++ b/contrib/mw-to-git/t/install-wiki/db_install.php
@@ -41,6 +41,9 @@ function get ($page_name = "") {
         curl_setopt($curl, CURLOPT_URL, $url);
 
         $page = curl_exec($curl);
+	if (!$page) {
+		die ("Could not get page: $url\n");
+	}
         curl_close($curl);
         return $page;
 }
-- 
1.7.11.rc0.57.g84a04c7

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]