From: Alan Knowles Date: Tue, 18 Oct 2016 04:47:09 +0000 (+0800) Subject: SimpleExcel.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=e236235ab0f66291fbc9c0a7185382ec1f7910bd SimpleExcel.php --- diff --git a/SimpleExcel.php b/SimpleExcel.php index c3cc0624..cf29b8ff 100644 --- a/SimpleExcel.php +++ b/SimpleExcel.php @@ -328,8 +328,13 @@ class Pman_Core_SimpleExcel extends Pman continue; } if (isset($col_cfg['txtrenderer'])) { - $v = call_user_func($col_cfg['txtrenderer'], - $cl[$col_cfg['dataIndex']], $worksheet, $r+1, $c, $clo); + + if (is_a($col_cfg['txtrenderer'], 'Closure')) { + $v = $col_cfg['txtrenderer']->call($cl[$col_cfg['dataIndex']], $worksheet, $r+1, $c, $clo); + } else { + $v = call_user_func($col_cfg['txtrenderer'], + $cl[$col_cfg['dataIndex']], $worksheet, $r+1, $c, $clo); + } if ($v === false) { continue; }