mirror of
https://github.com/processwire/processwire.git
synced 2025-08-31 18:31:56 +02:00
Fix issue processwire/processwire-issues#2116
This commit is contained in:
@@ -282,7 +282,7 @@ class TemplateFile extends WireData {
|
||||
/**
|
||||
* Render the template: execute it and return its output
|
||||
*
|
||||
* @return string The output of the Template File
|
||||
* @return string|array The output of the Template File
|
||||
* @throws WireException|\Exception Throws WireException if file not exist + any exceptions thrown by included file(s)
|
||||
*
|
||||
*/
|
||||
@@ -351,8 +351,9 @@ class TemplateFile extends WireData {
|
||||
|
||||
if($this->trim) $out = trim($out);
|
||||
|
||||
if(!strlen($out) && !$this->halt && $this->returnValue && $this->returnValue !== 1) {
|
||||
return $this->returnValue;
|
||||
if(!strlen($out) && !$this->halt) {
|
||||
if(is_array($this->returnValue)) return $this->returnValue;
|
||||
if($this->returnValue && $this->returnValue !== 1) return $this->returnValue;
|
||||
}
|
||||
|
||||
return $out;
|
||||
|
Reference in New Issue
Block a user