I can't reproduce the problem unless I delete code from the files, making the array unavailable.
in the header_php.php file, as you mentioned, line 41 produces the array:
Code:
$addressArray[] = array('firstname'=>$addresses->fields['firstname'],
'lastname'=>$addresses->fields['lastname'],
'address_book_id'=>$addresses->fields['address_book_id'],
'format_id'=>$format_id,
'address'=>$addresses->fields);
Then line 26 of the template produces the output by looping through the array:
Code:
foreach ($addressArray as $addresses) {
If the header_php.php file is missing code, then I could see this happening.
I suppose if you failed to actually save a valid address, then the error would appear too, since that array isn't initialized outside of the loop that produces the address data for output.
To initialize the array and suppress the error, you could add this on line 37 of the header_php.php file:
Code:
$addressArray = array();
, right above this line:
Code:
while (!$addresses->EOF) {
Thus, if you have some sort of database problem preventing the address from being saved, or a sessions problem preventing the customer's session id from being retained, then you'll see no address displayed, but also no error.
Bookmarks