Skip to content

Commit a4929ca

Browse files
committed
Fix sfWebResponse->getContentType() return a string not an array
1 parent fec4684 commit a4929ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/response/sfWebResponse.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ public function getCharset()
312312
/**
313313
* Gets response content type.
314314
*
315-
* @return array
315+
* @return string
316316
*/
317317
public function getContentType()
318318
{

test/unit/response/sfWebResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function normalizeHeaderName($name)
132132

133133
$response->setContentType('text/xml');
134134
$response->setContentType('text/html');
135-
$t->is(count($response->getHttpHeader('content-type')), 1, '->setContentType() overrides previous content type if replace is true');
135+
$t->is($response->getHttpHeader('content-type'), 'text/html; charset=ISO-8859-1', '->setContentType() overrides previous content type if replace is true');
136136

137137
// ->getTitle() ->setTitle() ->prependTitle
138138
$t->diag('->getTitle() ->setTitle() ->prependTitle()');

0 commit comments

Comments
 (0)