From: Sara Golemon Date: Tue, 16 Dec 2003 19:45:35 +0000 (+0000) Subject: MFH: Fail loudly. This is too often reported as a "bug". X-Git-Tag: php-4.3.5RC1~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49e7c1eb7a232e71712c78367f7be6299925a6ab;p=php MFH: Fail loudly. This is too often reported as a "bug". --- diff --git a/NEWS b/NEWS index d1fd51621f..c775806e2c 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ PHP 4 NEWS (Edin) - Added support for --program-prefix and --program-suffix configure options. (Jani) +- Added warning when unable to create temp stream for ftp_(n)list(). (Sara) - Fixed header handler in NSAPI SAPI module (header->replace was ignored, send_default_content_type now sends value from php.ini). (Uwe Schindler) - Fixed bug #26635 (fixed look up for fonts in the current directory w/ZTS). diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 01710ec656..7e9f314cbb 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1460,8 +1460,10 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC) char **entry; char *text; - if ((tmpfp = tmpfile()) == NULL) + if ((tmpfp = tmpfile()) == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file. Check permissions in temporary files directory."); return NULL; + } if (!ftp_type(ftp, FTPTYPE_ASCII)) goto bail;