Hallo liebe Community.
Gerade eben musste ich eine funktionierende Klasse umschreiben und habe mir meine letzte Methode etwas zerstört. Ich kann den fehler aber nicht finden. Hier der relevante Code.
// must be available as key in $form_list
private $form_type = 'contact';
// list of all form types
// here you can specify your form-types, associated page-ids and fields
private $form_list = array(
'contact' => array(
'pid' => array('220', '221', '439'),
'fields' => array('uid', 'pid', 'L', 'logdate', 'salutation', 'surname', 'firstname', 'street', 'plz', 'city', 'country', 'phone', 'fax', 'email', 'message')
),
'assist' => array(
'pid' => array('223', '451'),
'fields' => array('uid', 'pid', 'L', 'logdate', 'salutation', 'surname', 'firstname', 'street', 'plz', 'city', 'country', 'phone', 'fax', 'email')
),
'info' => array(
'pid' => array('226', '431'),
'fields' => array('uid', 'pid', 'L', 'logdate', 'salutation', 'surname', 'firstname', 'street', 'plz', 'city', 'country', 'phone', 'fax', 'email', 'infoCheckBox1', 'infoCheckBox2', 'infoCheckBox3', 'infoCheckBox4')
)
);
//Ausschnitt aus der betroffenen Methode
//$o = output
foreach ( $this->form_list[$this->form_type]['fields'] as $val ) {
$o .= $div_val.$val.$div_val;
$o .= ( $val != end($this->form_list[$this->form_type]['fields']) )
? $div_col
: $nl;
}
Der Fehler lautet:
Warning: end() [function.end]: Passed variable is not an array or object in /path/to/file.php on line 200
Zeile 200 ist die Zeile, in welcher ich die Funktion end() aufrufe.
Ich danke schonmal im Vorraus für Tipps und Anstubbser.