]> granicus.if.org Git - php/commit
Update bcmath.scale when calling bcscale()
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 21 Oct 2020 15:03:54 +0000 (17:03 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 21 Oct 2020 15:06:48 +0000 (17:06 +0200)
commitac87880addfd22e651b210346178dc1ed851b1dd
tree23b6613bd80f0240ad9733ef9821bcd0aeed1a83
parentcb6f9a65681bedee18fbd994495ddf3ba41367ac
Update bcmath.scale when calling bcscale()

We should keep the value of bcmath.scale and the internal
bc_precision global synchronized.

Probably more important than the ability to retrieve bcmath.scale
via ini_get(), this also makes sure that the set scale does not
leak into the next request, as it currently does.
ext/bcmath/bcmath.c
ext/bcmath/tests/bcscale_variation003.phpt