summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/file.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 79abc8aa1e..f2982c388c 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -247,7 +247,7 @@ static int flock_values[] = { LOCK_SH, LOCK_EX, LOCK_UN };
PHP_FUNCTION(flock)
{
zval *arg1, *arg3 = NULL;
- int fd, act;
+ int act;
php_stream *stream;
long operation = 0;
@@ -257,10 +257,6 @@ PHP_FUNCTION(flock)
php_stream_from_zval(stream, &arg1);
- if (php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, 1) == FAILURE) {
- RETURN_FALSE;
- }
-
act = operation & 3;
if (act < 1 || act > 3) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Illegal operation argument");