]> granicus.if.org Git - php/commitdiff
MFB: explain why ftok() failed
authorAntony Dovgal <tony2001@php.net>
Fri, 28 Jan 2005 16:36:46 +0000 (16:36 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 28 Jan 2005 16:36:46 +0000 (16:36 +0000)
ext/standard/ftok.c

index ec270d2f14b037862f745546dce0445011cf7787..fc39a981564e5372b386897a5beb8c957357c44a 100644 (file)
@@ -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);
 }