]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-17617 - fixed regressions - missing $ch
authorskodak <skodak>
Sat, 17 Jan 2009 18:47:54 +0000 (18:47 +0000)
committerskodak <skodak>
Sat, 17 Jan 2009 18:47:54 +0000 (18:47 +0000)
lib/filelib.php

index 615ef88a97333823f8126ba7afe3e63d93ccd93d..bae9153255f271558d428929df935dae75296109 100644 (file)
@@ -344,7 +344,10 @@ function download_file_content($url, $headers=null, $postdata=null, $fullrespons
     // check if proxy (if used) should be bypassed for this url
     $proxybypass = is_proxybypass($url);
 
-    $ch = curl_init($url);
+    if (!$ch = curl_init($url)) {
+        debugging('Can not init curl.');
+        return false;
+    }
 
     // set extra headers
     if (is_array($headers) ) {