Skip to content

Commit c067f4b

Browse files
committed
Address comment
1 parent 0377597 commit c067f4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/bcmath/bcmath.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ static zend_result bcmath_number_do_operation(uint8_t opcode, zval *ret_val, zva
11861186
}
11871187

11881188
if (UNEXPECTED(CHECK_SCALE_OVERFLOW(n1_full_scale) || CHECK_SCALE_OVERFLOW(n2_full_scale))) {
1189-
zend_value_error("Number has too large scale");
1189+
zend_value_error("scale must be between 0 and %d", INT_MAX);
11901190
goto fail;
11911191
}
11921192

@@ -1278,7 +1278,7 @@ static int bcmath_number_compare(zval *op1, zval *op2)
12781278
}
12791279

12801280
if (UNEXPECTED(CHECK_SCALE_OVERFLOW(n1_full_scale) || CHECK_SCALE_OVERFLOW(n2_full_scale))) {
1281-
zend_value_error("Number has too large scale");
1281+
zend_value_error("scale must be between 0 and %d", INT_MAX);
12821282
goto fallback;
12831283
}
12841284

@@ -1316,7 +1316,7 @@ static zend_always_inline zend_result bc_num_from_obj_or_str_or_long_with_err(
13161316
return FAILURE;
13171317
}
13181318
if (UNEXPECTED(CHECK_SCALE_OVERFLOW(full_scale))) {
1319-
zend_argument_value_error(arg_num, "has too large scale");
1319+
zend_argument_value_error(arg_num, "must be between 0 and %d", INT_MAX);
13201320
return FAILURE;
13211321
}
13221322
if (scale != NULL) {

0 commit comments

Comments
 (0)