]> granicus.if.org Git - php/commitdiff
silence
authorMarcus Boerger <helly@php.net>
Tue, 5 Nov 2002 11:17:45 +0000 (11:17 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 5 Nov 2002 11:17:45 +0000 (11:17 +0000)
#when i get this code right tmp_line is not initialised, too.
#Therefore php_stream_wrapper_log_error() will be called with
#undefined value, will it?

ext/standard/ftp_fopen_wrapper.c

index e852c9a923d76d654a8f827f03a4697c1e15360b..d961a4b1e1d8dac9bdfbbf2d96f7c23cfc5cceb8 100644 (file)
@@ -162,8 +162,10 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, char *path, ch
                resource->port = 21;
        
        stream = php_stream_sock_open_host(resource->host, resource->port, SOCK_STREAM, NULL, 0);
-       if (stream == NULL)
+       if (stream == NULL) {
+               result = 0; /* silence */
                goto errexit;
+       }
 
        php_stream_context_set(stream, context);
        php_stream_notify_info(context, PHP_STREAM_NOTIFY_CONNECT, NULL, 0);