1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-31 18:31:56 +02:00
This commit is contained in:
Ryan Cramer
2025-08-29 17:09:13 -04:00
parent d7b48cce94
commit d5fddd303c

View File

@@ -282,7 +282,7 @@ class TemplateFile extends WireData {
/** /**
* Render the template: execute it and return its output * 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) * @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($this->trim) $out = trim($out);
if(!strlen($out) && !$this->halt && $this->returnValue && $this->returnValue !== 1) { if(!strlen($out) && !$this->halt) {
return $this->returnValue; if(is_array($this->returnValue)) return $this->returnValue;
if($this->returnValue && $this->returnValue !== 1) return $this->returnValue;
} }
return $out; return $out;