Skip to content

Commit a6925a2

Browse files
committed
review
1 parent c7d0dae commit a6925a2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/zip/php_zip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,7 +2398,7 @@ PHP_METHOD(ZipArchive, setCompressionName)
23982398
}
23992399

24002400
if (comp_method < -1 || comp_method > INT_MAX) {
2401-
zend_argument_value_error(2, "must be between 0 and %d", INT_MAX);
2401+
zend_argument_value_error(2, "must be between -1 and %d", INT_MAX);
24022402
RETURN_THROWS();
24032403
}
24042404

@@ -3050,7 +3050,7 @@ PHP_METHOD(ZipArchive, isEncryptionMethodSupported)
30503050
zend_argument_value_error(1, "must be between 0 and %u", USHRT_MAX);
30513051
RETURN_THROWS();
30523052
}
3053-
RETVAL_BOOL(zip_encryption_method_supported((zip_uint16_t)method, enc));
3053+
RETURN_BOOL(zip_encryption_method_supported((zip_uint16_t)method, enc));
30543054
}
30553055
/* }}} */
30563056
#endif

ext/zip/tests/oo_setcompression.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ unlink($tmpfile);
8181
bool(true)
8282
bool(true)
8383
bool(true)
84-
ZipArchive::setCompressionName(): Argument #2 ($method) must be between 0 and %d
85-
ZipArchive::setCompressionName(): Argument #2 ($method) must be between 0 and %d
84+
ZipArchive::setCompressionName(): Argument #2 ($method) must be between -1 and %d
85+
ZipArchive::setCompressionName(): Argument #2 ($method) must be between -1 and %d
8686
ZipArchive::setCompressionIndex(): Argument #2 ($method) must be between -1 and %d
8787
ZipArchive::setCompressionIndex(): Argument #2 ($method) must be between -1 and %d
8888
bool(true)

0 commit comments

Comments
 (0)