Skip to content

Commit 675af48

Browse files
committed
Address comment
1 parent a4a985b commit 675af48

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
@@ -1187,7 +1187,7 @@ static zend_result bcmath_number_do_operation(uint8_t opcode, zval *ret_val, zva
11871187
}
11881188

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

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

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

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

0 commit comments

Comments
 (0)