Skip to content

Commit eb9fc9e

Browse files
committed
Merge branch '3.1/master' into 3.1/develop
2 parents 8104d8f + cd21edb commit eb9fc9e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

classes/kohana/kostache.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
abstract class Kohana_Kostache {
1414

15-
const VERSION = '2.0.1';
15+
const VERSION = '2.0.2';
1616

1717
/**
1818
* Factory method for Kostache views. Accepts a template path and an
@@ -60,8 +60,16 @@ public function __construct($template = NULL, array $partials = NULL)
6060
{
6161
if ( ! $template)
6262
{
63-
// Detect the template for this class
64-
$template = $this->_detect_template();
63+
if ($this->_template)
64+
{
65+
// Load the template defined in the view
66+
$template = $this->_template;
67+
}
68+
else
69+
{
70+
// Detect the template for this class
71+
$template = $this->_detect_template();
72+
}
6573
}
6674

6775
// Load the template
@@ -103,7 +111,7 @@ public function __toString()
103111
ob_start();
104112

105113
// Render the exception
106-
Kohana_Exception::text($e);
114+
Kohana_Exception::handler($e);
107115

108116
return (string) ob_get_clean();
109117
}

0 commit comments

Comments
 (0)