mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
Check if get_errors() exists before calling it to prevent fatal error
This commit is contained in:
parent
9de9fe1930
commit
cd36305293
@ -309,7 +309,7 @@
|
|||||||
fwrite(STDERR,'importexport_schedule: ' . date('c') . ": Definition not found! \n");
|
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();
|
$data['errors'] = $po->get_errors();
|
||||||
fwrite(STDERR, 'importexport_schedule: ' . date('c') . ": Import errors:\n#\tError\n");
|
fwrite(STDERR, 'importexport_schedule: ' . date('c') . ": Import errors:\n#\tError\n");
|
||||||
foreach($po->get_errors() as $record => $error) {
|
foreach($po->get_errors() as $record => $error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user