summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-01-28 16:36:46 +0000
committerAntony Dovgal <tony2001@php.net>2005-01-28 16:36:46 +0000
commitc61ce71a01609409788de7e9646c5a95f73d77eb (patch)
tree348b32db0a43744e60b56246863c9339230deb53
parentd5d127c3add770840e32974bcec32bbab053841b (diff)
downloadphp-git-c61ce71a01609409788de7e9646c5a95f73d77eb.tar.gz
MFB: explain why ftok() failed
-rw-r--r--ext/standard/ftok.c3
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);
}