diff options
| author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-01-15 11:27:29 +0100 |
|---|---|---|
| committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-01-17 14:52:46 +0100 |
| commit | d1764ca33018f1f2e4a05926c879c67ad4aa8da5 (patch) | |
| tree | 443cab099d2d5989a93a8102f599b51d36acc64e /ext/bcmath | |
| parent | 117b18d22d14fb6a597b3cd6d52e75cef2d088bb (diff) | |
| download | php-git-d1764ca33018f1f2e4a05926c879c67ad4aa8da5.tar.gz | |
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
Diffstat (limited to 'ext/bcmath')
| -rw-r--r-- | ext/bcmath/libbcmath/src/raise.c | 4 | ||||
| -rw-r--r-- | ext/bcmath/libbcmath/src/raisemod.c | 6 | ||||
| -rw-r--r-- | ext/bcmath/tests/bcpow_error1.phpt | 2 | ||||
| -rw-r--r-- | ext/bcmath/tests/bcpow_error2.phpt | 2 | ||||
| -rw-r--r-- | ext/bcmath/tests/bug72093.phpt | 2 | ||||
| -rw-r--r-- | ext/bcmath/tests/bug75178.phpt | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/ext/bcmath/libbcmath/src/raise.c b/ext/bcmath/libbcmath/src/raise.c index e00a62e215..700a50f50c 100644 --- a/ext/bcmath/libbcmath/src/raise.c +++ b/ext/bcmath/libbcmath/src/raise.c @@ -54,10 +54,10 @@ bc_raise (bc_num num1, bc_num num2, bc_num *result, int scale) /* Check the exponent for scale digits and convert to a long. */ if (num2->n_scale != 0) - php_error_docref (NULL, E_WARNING, "non-zero scale in exponent"); + php_error_docref (NULL, E_WARNING, "Non-zero scale in exponent"); exponent = bc_num2long (num2); if (exponent == 0 && (num2->n_len > 1 || num2->n_value[0] != 0)) - php_error_docref (NULL, E_WARNING, "exponent too large"); + php_error_docref (NULL, E_WARNING, "Exponent too large"); /* Special case if exponent is a zero. */ if (exponent == 0) diff --git a/ext/bcmath/libbcmath/src/raisemod.c b/ext/bcmath/libbcmath/src/raisemod.c index 58f9532545..2865903940 100644 --- a/ext/bcmath/libbcmath/src/raisemod.c +++ b/ext/bcmath/libbcmath/src/raisemod.c @@ -79,21 +79,21 @@ bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale) /* Check the base for scale digits. */ if (power->n_scale != 0) { - php_error_docref (NULL, E_WARNING, "non-zero scale in base"); + php_error_docref (NULL, E_WARNING, "Non-zero scale in base"); _bc_truncate (&power); } /* Check the exponent for scale digits. */ if (exponent->n_scale != 0) { - php_error_docref (NULL, E_WARNING, "non-zero scale in exponent"); + php_error_docref (NULL, E_WARNING, "Non-zero scale in exponent"); _bc_truncate (&exponent); } /* Check the modulus for scale digits. */ if (modulus->n_scale != 0) { - php_error_docref (NULL, E_WARNING, "non-zero scale in modulus"); + php_error_docref (NULL, E_WARNING, "Non-zero scale in modulus"); _bc_truncate (&modulus); } diff --git a/ext/bcmath/tests/bcpow_error1.phpt b/ext/bcmath/tests/bcpow_error1.phpt index 2dc2dbd092..822b70eb86 100644 --- a/ext/bcmath/tests/bcpow_error1.phpt +++ b/ext/bcmath/tests/bcpow_error1.phpt @@ -9,5 +9,5 @@ if (!extension_loaded('bcmath')) die('skip bcmath extension is not available'); var_dump(bcpow('1', '1.1', 2)); ?> --EXPECTF-- -Warning: bcpow(): non-zero scale in exponent in %s on line %d +Warning: bcpow(): Non-zero scale in exponent in %s on line %d string(4) "1.00" diff --git a/ext/bcmath/tests/bcpow_error2.phpt b/ext/bcmath/tests/bcpow_error2.phpt index ca13875ed3..95c3f80b08 100644 --- a/ext/bcmath/tests/bcpow_error2.phpt +++ b/ext/bcmath/tests/bcpow_error2.phpt @@ -9,5 +9,5 @@ if (!extension_loaded('bcmath')) die('skip bcmath extension is not available'); var_dump(bcpow('0', '9223372036854775808', 2)); ?> --EXPECTF-- -Warning: bcpow(): exponent too large in %s on line %d +Warning: bcpow(): Exponent too large in %s on line %d string(4) "1.00" diff --git a/ext/bcmath/tests/bug72093.phpt b/ext/bcmath/tests/bug72093.phpt index 4295384a30..235a4e04a3 100644 --- a/ext/bcmath/tests/bug72093.phpt +++ b/ext/bcmath/tests/bug72093.phpt @@ -12,5 +12,5 @@ var_dump(bcpowmod(1, 1.2, 1, 1)); --EXPECTF-- string(1) "1" -Warning: bcpowmod(): non-zero scale in exponent in %s on line %d +Warning: bcpowmod(): Non-zero scale in exponent in %s on line %d string(3) "0.0" diff --git a/ext/bcmath/tests/bug75178.phpt b/ext/bcmath/tests/bug75178.phpt index dd811fccb9..2b7ab4b2c6 100644 --- a/ext/bcmath/tests/bug75178.phpt +++ b/ext/bcmath/tests/bug75178.phpt @@ -10,8 +10,8 @@ var_dump(bcpowmod('4.1', '4', '3', 3)); var_dump(bcpowmod('4', '4', '3.1', 3)); ?> --EXPECTF-- -Warning: bcpowmod(): non-zero scale in base in %s on line %d +Warning: bcpowmod(): Non-zero scale in base in %s on line %d string(5) "1.000" -Warning: bcpowmod(): non-zero scale in modulus in %s on line %d +Warning: bcpowmod(): Non-zero scale in modulus in %s on line %d string(5) "1.000" |
