From: Andrei Zmievski Date: Mon, 14 Feb 2000 14:18:17 +0000 (+0000) Subject: Fix for filesize() and others on sockets. X-Git-Tag: BEFORE_SAPI_POST_PATCH_17_FEB_2000~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f71098906b2be4f0063b966d63b771d678a514f9;p=php Fix for filesize() and others on sockets. --- diff --git a/NEWS b/NEWS index f39537979c..509b45d116 100644 --- a/NEWS +++ b/NEWS @@ -5,7 +5,7 @@ PHP 4.0 NEWS - Fix overrun in strip_tags (Stas, Zend library) - Fixed crash in strip_tags() and related functions. (Thies) - Workaround for bogus POST-Data from IE/Mac. (Thies) -- Patch by Alain Malek + Patch by Alain Malek - Finished the server abstraction layer; All of the PHP code is now shared across different servers (Apache, CGI, IIS, etc.), except for thin interface modules (Zeev) diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index dbbf472993..d32152b509 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -542,7 +542,8 @@ void name(INTERNAL_FUNCTION_PARAMETERS) { \ WRONG_PARAM_COUNT; \ } \ convert_to_string_ex(filename); \ - php_stat((*filename)->value.str.val, funcnum, return_value); \ + if ((*filename)->value.str.len) \ + php_stat((*filename)->value.str.val, funcnum, return_value); \ } FileFunction(PHP_FN(fileperms),0)