Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FIXED: Odd crash with error "Invalid CRT parameters detected" in test…

… cases. Replaced with equivalent non-crashing code.
  • Loading branch information...
commit ba62557aacece7d3fe6d15a19ab3e414faad2b4a 1 parent a3b3ec8
@tractorcow tractorcow authored chillu committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/unit/TranslatableTest.php
View
6 tests/unit/TranslatableTest.php
@@ -260,7 +260,8 @@ function testDataObjectGetWithReadingLanguage() {
sprintf("\"SiteTree\".\"MenuTitle\" = '%s'", 'A Testpage')
);
$resultPagesDefaultLangIDs = $resultPagesDefaultLang->column('ID');
- array_walk($resultPagesDefaultLangIDs, 'intval');
+ foreach($resultPagesDefaultLangIDs as $key => $val)
+ $resultPagesDefaultLangIDs[$key] = intval($val);
$this->assertEquals($resultPagesDefaultLang->Count(), 2);
$this->assertContains((int)$origTestPage->ID, $resultPagesDefaultLangIDs);
$this->assertContains((int)$otherTestPage->ID, $resultPagesDefaultLangIDs);
@@ -273,7 +274,8 @@ function testDataObjectGetWithReadingLanguage() {
sprintf("\"SiteTree\".\"MenuTitle\" = '%s'", 'A Testpage')
);
$resultPagesCustomLangIDs = $resultPagesCustomLang->column('ID');
- array_walk($resultPagesCustomLangIDs, 'intval');
+ foreach($resultPagesCustomLangIDs as $key => $val)
+ $resultPagesCustomLangIDs[$key] = intval($val);
$this->assertEquals($resultPagesCustomLang->Count(), 1);
$this->assertNotContains((int)$origTestPage->ID, $resultPagesCustomLangIDs);
$this->assertNotContains((int)$otherTestPage->ID, $resultPagesCustomLangIDs);
Please sign in to comment.
Something went wrong with that request. Please try again.