diff options
-rw-r--r-- | ext/standard/ftok.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |