From: Simon.Cathebras Date: Thu, 14 Jun 2012 09:23:43 GMT Subject: Re: [PATCH 3/3] Explicit error when curl_exec() fails Message-ID: <4FD9AD9F.5050708@ensimag.imag.fr> In-Reply-To: <1339664243-31952-4-git-send-email-Matthieu.Moy@imag.fr> On 14/06/2012 10:57, Matthieu Moy wrote: > Signed-off-by: Matthieu Moy > --- > 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; > } Seems legitimate. But there is a whitespace/indentation problem isn't it ? -- CATHEBRAS Simon 2A-ENSIMAG Filière Ingéniérie des Systèmes d'Information Membre Bug-Buster