Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only change locale for LC_NUMERIC instead of LC_ALL, on some installs…

… this woudl cause an error:

"setlocale(): Specified locale name is too long"
  • Loading branch information...
commit 8b94d9e9e7e8b01497ce89f1d7f921c384bd95f2 1 parent cf18e8d
@ceeram ceeram authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
View
6 lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
@@ -147,8 +147,8 @@ public function testQuoting() {
public function testLocalizedFloats() {
$this->skipIf(DS === '\\', 'The locale is not supported in Windows and affect the others tests.');
- $restore = setlocale(LC_ALL, 0);
- setlocale(LC_ALL, 'de_DE');
+ $restore = setlocale(LC_NUMERIC, 0);
+ setlocale(LC_NUMERIC, 'de_DE');
$result = $this->Dbo->value(3.141593);
$this->assertEquals('3.141593', $result);
@@ -171,7 +171,7 @@ public function testLocalizedFloats() {
$result = $this->db->value(2.2E-54);
$this->assertEquals('2.2E-54', (string)$result);
- setlocale(LC_ALL, $restore);
+ setlocale(LC_NUMERIC, $restore);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.