From: Antony Dovgal Date: Fri, 28 Jan 2005 16:33:09 +0000 (+0000) Subject: add warning explaining why ftok() failed X-Git-Tag: php-5.0.4RC1~227 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5dff4e8e40c754bd219a70674ee0790a2cc39951;p=php add warning explaining why ftok() failed --- diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c index ec270d2f14..fc39a98156 100644 --- a/ext/standard/ftok.c +++ b/ext/standard/ftok.c @@ -57,6 +57,9 @@ PHP_FUNCTION(ftok) } k = ftok(Z_STRVAL_PP(pathname),Z_STRVAL_PP(proj)[0]); + if (k == -1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "ftok() failed - %s", strerror(errno)); + } RETURN_LONG(k); }