From bc6bf24c9e43e346b6a71845bbde509042813bd4 Mon Sep 17 00:00:00 2001 From: edward Date: Mon, 18 Jul 2016 16:40:28 +0800 Subject: [PATCH] MessagePreview.php --- MessagePreview.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MessagePreview.php b/MessagePreview.php index 161b8300..82cbfad3 100644 --- a/MessagePreview.php +++ b/MessagePreview.php @@ -83,9 +83,13 @@ class Pman_Core_MessagePreview extends Pman $x = new $cls; - if(!method_exists($x, "test_{$core_email->name}")){ - $this->jerr("Function test_{$core_email->name} does not exists"); + $method = "test_{$core_email->name}"; + + if(!method_exists($x, $method)){ + $this->jerr("{$method} does not exists in {$cls}"); } + $x-> + } } -- 2.39.2