Browse Source

Safety check on cmodel load

pull/656/head
MorganDawe 9 years ago
parent
commit
16fbfc1ac1
  1. 6
      includes/ingest.form.inc

6
includes/ingest.form.inc

@ -927,12 +927,14 @@ function islandora_ingest_form_get_steps(array &$form_state) {
function islandora_form_islandora_ingest_form_alter(&$form, &$form_state) {
foreach ($form_state['islandora']['shared_storage']['models'] as $key => $cmodel) {
$fedora_cmodel = islandora_object_load($cmodel);
$cmodel_label = $fedora_cmodel->{'label'};
if ($fedora_cmodel) {
$form["contact_information_$key"] = array(
'#markup' => "<h3>$cmodel_label</h3></br>",
'#markup' => "<h3>$fedora_cmodel->label</h3></br>",
'#weight' => -1000,
);
}
}
}
/**

Loading…
Cancel
Save