]> granicus.if.org Git - php/commitdiff
Fixed bug#49578 (make install-pear fails)
authorHannes Magnusson <bjori@php.net>
Thu, 17 Sep 2009 11:36:29 +0000 (11:36 +0000)
committerHannes Magnusson <bjori@php.net>
Thu, 17 Sep 2009 11:36:29 +0000 (11:36 +0000)
# Apparently this script was using 5.3 functionality
# Workaround would be to install 'wget'

pear/fetch.php

index 01d223392e48d54997dcb841e0a50db48ba16bd0..62c436a2677fce1d8ecaa5c053931edda2eb2989 100644 (file)
@@ -61,7 +61,12 @@ if (!isset($_ENV['http_proxy'])) {
     );
 }
 
-$ctx = stream_context_create($copt, array("notification" => "stream_notification_callback"));
+if ($copt) {
+       $ctx = stream_context_create($copt);
+} else {
+       $ctx = stream_context_create();
+}
+stream_context_set_params($ctx, array("notification" => "stream_notification_callback"));
 
 $fp = fopen($argv[1], "r", false, $ctx);
 if (is_resource($fp) && file_put_contents($argv[2], $fp)) {