1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-20 05:21:29 +02:00

Add PR #206 Fix: WireCache output buffer not closed

This commit is contained in:
Radon8472
2022-01-04 11:43:19 -05:00
committed by Ryan Cramer
parent 8c10a7052a
commit 49de9483ce

View File

@@ -342,15 +342,17 @@ class WireCache extends Wire {
ob_start(); ob_start();
if(count($args)) { try {
$value = call_user_func_array($func, $args); if(count($args)) {
} else { $value = call_user_func_array($func, $args);
$value = $func(); } else {
$value = $func();
}
} finally { // PHP 5.5+
$out = ob_get_contents();
ob_end_clean();
} }
$out = ob_get_contents();
ob_end_clean();
if(empty($value) && !empty($out)) $value = $out; if(empty($value) && !empty($out)) $value = $out;
if($value !== false) { if($value !== false) {