From a2624df5f22ca49b0181c83cfce59e18ba382206 Mon Sep 17 00:00:00 2001 From: gwoo Date: Sun, 23 Dec 2007 01:07:10 +0000 Subject: [PATCH] fixing fail in Html::meta(); and adding ClassRegistry::flush(); to fix no_database test group. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6207 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/view/helpers/html.php | 7 ++++--- cake/tests/cases/libs/view/helper.test.php | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index 4c13bd301..2d460b2af 100644 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -226,14 +226,15 @@ class HtmlHelper extends AppHelper { $attributes = array_merge($type, $attributes); - if (isset($attributes['link'])) { + $out = null; + if (isset($attributes['link'])) { if (isset($attributes['rel']) && $attributes['rel'] === 'icon') { + $out = sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link'))); $attributes['rel'] = 'shortcut icon'; - $out .= sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link'))); } else { $attributes['link'] = $this->url($attributes['link'], true); } - $out = sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link'))); + $out .= sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link'))); } else { $out = sprintf($this->tags['meta'], $this->_parseAttributes($attributes, array('type'))); } diff --git a/cake/tests/cases/libs/view/helper.test.php b/cake/tests/cases/libs/view/helper.test.php index eb61b0094..8e468abed 100755 --- a/cake/tests/cases/libs/view/helper.test.php +++ b/cake/tests/cases/libs/view/helper.test.php @@ -102,6 +102,7 @@ class HelperTestPostsTag extends Model { class HelperTest extends UnitTestCase { function setUp() { + ClassRegistry::flush(); Router::reload(); $null = null; $this->View = new View($null);