Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Making dependency checks more test-friendly in `Html` helper.

  • Loading branch information...
commit 7e42ea7d611824c97a920df40ba1bd81d4a56a73 1 parent d414e4a
@nateabele nateabele authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 template/helper/Html.php
View
4 template/helper/Html.php
@@ -110,7 +110,9 @@ class Html extends \lithium\template\Helper {
* @return string A meta tag containing the specified encoding (literally).
*/
public function charset($encoding = null) {
- $encoding = $encoding ?: $this->_context->response()->encoding;
+ if ($response = $this->_context->response()) {
+ $encoding = $encoding ?: $response->encoding;
+ }
return $this->_render(__METHOD__, 'charset', compact('encoding'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.