From cd363052933c72a9d6e75f4c8e0d53a17ba201d9 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 11 Jan 2011 18:08:20 +0000 Subject: [PATCH] Check if get_errors() exists before calling it to prevent fatal error --- importexport/inc/class.importexport_schedule_ui.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/importexport/inc/class.importexport_schedule_ui.inc.php b/importexport/inc/class.importexport_schedule_ui.inc.php index 18c8531b6b..426a3091da 100644 --- a/importexport/inc/class.importexport_schedule_ui.inc.php +++ b/importexport/inc/class.importexport_schedule_ui.inc.php @@ -309,7 +309,7 @@ fwrite(STDERR,'importexport_schedule: ' . date('c') . ": Definition not found! \n"); } - if($po->get_errors()) { + if(method_exists($po, 'get_errors') && $po->get_errors()) { $data['errors'] = $po->get_errors(); fwrite(STDERR, 'importexport_schedule: ' . date('c') . ": Import errors:\n#\tError\n"); foreach($po->get_errors() as $record => $error) {