From ba62557aacece7d3fe6d15a19ab3e414faad2b4a Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 16 Aug 2012 16:47:24 +1200 Subject: [PATCH] FIXED: Odd crash with error "Invalid CRT parameters detected" in test cases. Replaced with equivalent non-crashing code. --- tests/unit/TranslatableTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/TranslatableTest.php b/tests/unit/TranslatableTest.php index e8d17c8..cd59919 100755 --- a/tests/unit/TranslatableTest.php +++ b/tests/unit/TranslatableTest.php @@ -260,7 +260,8 @@ class TranslatableTest extends FunctionalTest { 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 @@ class TranslatableTest extends FunctionalTest { 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);