diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 04b40930c..087b454f6 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -2034,7 +2034,7 @@ class LeftAndMain_TreeNode extends ViewableData { } $classes .= ' ' . $filterClasses; } - return $classes; + return $classes ?: ''; } public function getObj() { diff --git a/docs/en/04_Changelogs/rc/3.4.4-rc1.md b/docs/en/04_Changelogs/rc/3.4.4-rc1.md new file mode 100644 index 000000000..a7d61bd93 --- /dev/null +++ b/docs/en/04_Changelogs/rc/3.4.4-rc1.md @@ -0,0 +1,14 @@ +# 3.4.4-rc1 + + + +## Change Log + +### Security + + * 2017-01-13 [c6c6c13](https://github.com/silverstripe/silverstripe-framework/commit/c6c6c13fc265aeedf5de7226b3cde39d185ba49d) Unescaped title attribute in LeftAndMain_TreeNode::forTemplate (Daniel Hensby) - See [ss-2017-001](http://www.silverstripe.org/download/security-releases/ss-2017-001) + +### Bugfixes + + * 2017-01-16 [17d123a](https://github.com/silverstripe/silverstripe-framework/commit/17d123a3be3a2c9e21845fda89c61f00301f78f5) Ensure correct regeneration of ConfigManifest if only one of the cache files is missing (Stephan Bauer) + * 2017-01-10 [5bba726](https://github.com/silverstripe/silverstripe-cms/commit/5bba7264c69b654ac5bcb87769781138be61cb92) Dont attempt to iterate over null in SiteTree::allowedChildren (Daniel Hensby) diff --git a/tests/forms/TreeDropdownFieldTest.php b/tests/forms/TreeDropdownFieldTest.php index 947f72283..42a8f6244 100644 --- a/tests/forms/TreeDropdownFieldTest.php +++ b/tests/forms/TreeDropdownFieldTest.php @@ -22,8 +22,8 @@ class TreeDropdownFieldTest extends SapphireTest { $cssPath = 'ul.tree li#selector-TestTree-'.$folder1->ID.' li#selector-TestTree-'.$folder1Subfolder1->ID.' a span.item'; $firstResult = $parser->getBySelector($cssPath); $this->assertEquals( - (string)$firstResult[0], $folder1Subfolder1->Name, + (string)$firstResult[0], $folder1Subfolder1->Name.' is found, nested under '.$folder1->Name ); @@ -31,8 +31,8 @@ class TreeDropdownFieldTest extends SapphireTest { $cssPath = 'ul.tree li#selector-TestTree-'.$subfolder->ID.' a span.item'; $secondResult = $parser->getBySelector($cssPath); $this->assertEquals( - (string)$secondResult[0], $subfolder->Name, + (string)$secondResult[0], $subfolder->Name.' is found at root level' ); @@ -40,9 +40,8 @@ class TreeDropdownFieldTest extends SapphireTest { $folder2 = $this->objFromFixture('Folder','folder2'); $cssPath = 'ul.tree li#selector-TestTree-'.$folder2->ID.' a span.item'; $noResult = $parser->getBySelector($cssPath); - $this->assertEquals( + $this->assertEmpty( $noResult, - array(), $folder2.' is not found' ); @@ -58,8 +57,8 @@ class TreeDropdownFieldTest extends SapphireTest { $cssPath = 'ul.tree li#selector-TestTree-'.$folder1->ID.' li#selector-TestTree-'.$folder1Subfolder1->ID.' a span.item'; $firstResult = $parser->getBySelector($cssPath); $this->assertEquals( - (string)$firstResult[0], $folder1Subfolder1->Name, + (string)$firstResult[0], $folder1Subfolder1->Name.' is found, nested under '.$folder1->Name ); @@ -74,8 +73,8 @@ class TreeDropdownFieldTest extends SapphireTest { $file1->Name.' with ID '.$file1->ID.' is in search results' ); $this->assertEquals( - (string)$firstResult[0], $file1->Name, + (string)$firstResult[0], $file1->Name.' is found nested under '.$subfolder->Name ); @@ -87,8 +86,8 @@ class TreeDropdownFieldTest extends SapphireTest { $file2->Name.' with ID '.$file2->ID.' is in search results' ); $this->assertEquals( - (string)$secondResult[0], $file2->Name, + (string)$secondResult[0], $file2->Name.' is found nested under '.$subfolder->Name ); @@ -96,9 +95,8 @@ class TreeDropdownFieldTest extends SapphireTest { $file3 = $this->objFromFixture('File','asdf'); $cssPath = 'ul.tree li#selector-TestTree-'.$file3->ID; $noResult = $parser->getBySelector($cssPath); - $this->assertEquals( + $this->assertEmpty( $noResult, - array(), $file3->Name.' is not found' ); }