Skip to content

Commit 7bb4ec2

Browse files
Merge branch '4.4' into 5.1
* 4.4: add mising sr (latn & cyrl) translations [Cache] fix ProxyAdapter not persisting items with infinite expiration [HttpClient] fail properly when the server replies with HTTP/0.9 Fix CS [Cache] Limit cache version character range [DI] dump OS-indepent paths in the compiled container allow consumers to mock all methods
2 parents 01a566a + 44965c5 commit 7bb4ec2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private function round($number)
237237
{
238238
if (null !== $this->scale && null !== $this->roundingMode) {
239239
// shift number to maintain the correct scale during rounding
240-
$roundingCoef = pow(10, $this->scale);
240+
$roundingCoef = 10 ** $this->scale;
241241
// string representation to avoid rounding errors, similar to bcmul()
242242
$number = (string) ($number * $roundingCoef);
243243

Tests/AbstractRequestHandlerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ public function testAddFormErrorIfPostMaxSizeExceeded($contentLength, $iniMax, $
338338
public function getPostMaxSizeFixtures()
339339
{
340340
return [
341-
[pow(1024, 3) + 1, '1G', true, ['{{ max }}' => '1G']],
342-
[pow(1024, 3), '1G', false],
343-
[pow(1024, 2) + 1, '1M', true, ['{{ max }}' => '1M']],
344-
[pow(1024, 2), '1M', false],
341+
[1024 ** 3 + 1, '1G', true, ['{{ max }}' => '1G']],
342+
[1024 ** 3, '1G', false],
343+
[1024 ** 2 + 1, '1M', true, ['{{ max }}' => '1M']],
344+
[1024 ** 2, '1M', false],
345345
[1024 + 1, '1K', true, ['{{ max }}' => '1K']],
346346
[1024, '1K', false],
347347
[null, '1K', false],

0 commit comments

Comments
 (0)