com php-src: Fix bad merge: ext/standard/file.c
| From: | Bob Weinand | Date: | Tue, 04 Nov 2014 17:23:20 +0000 |
| Subject: | com php-src: Fix bad merge: ext/standard/file.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82947@lists.php.net to get a copy of this message | ||
Commit: 90b4ec51adad6791b508d65b81e45233d687c23f
Author: Bob Weinand <bobwei9@hotmail.com> Tue, 4 Nov 2014 18:23:20 +0100
Parents: ad8ee7422531501b2e11dcdc9d4a2ea9ed3d25ef
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=90b4ec51adad6791b508d65b81e45233d687c23f
Log:
Fix bad merge
Changed paths:
M ext/standard/file.c
Diff:
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 97ffe69..4804e49 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -344,7 +344,7 @@ PHP_FUNCTION(flock)
php_stream *stream;
zend_long operation = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &res, &operation,
&wouldblock) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z/", &res, &operation,
&wouldblock) == FAILURE) {
return;
}
@@ -1207,8 +1207,10 @@ PHPAPI PHP_FUNCTION(fwrite)
if (ZEND_NUM_ARGS() == 2) {
num_bytes = inputlen;
+ } else if (maxlen <= 0) {
+ num_bytes = 0;
} else {
- num_bytes = MAX(0, MIN((size_t) maxlen, inputlen));
+ num_bytes = MIN((size_t) maxlen, inputlen);
}
if (!num_bytes) {