Skip to content

Commit b6bba37

Browse files
authored
Allow to use $before parameter in addItem() from XML (#4151)
1 parent 4005bc3 commit b6bba37

File tree

1 file changed

+3
-0
lines changed
  • app/code/core/Mage/Page/Block/Html

1 file changed

+3
-0
lines changed

app/code/core/Mage/Page/Block/Html/Head.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,9 @@ protected function _isFile($filename)
547547
*/
548548
protected function _sortItems($referenceName, $before, $type)
549549
{
550+
// Convert string values ("true"/"false") to bool
551+
$before = filter_var($before, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
552+
550553
$items = $this->_data['items'];
551554

552555
// get newly inserted item so we do not have to reproduce the functionality of the parent

0 commit comments

Comments
 (0)