mycolumbus:

Yours is a different problem so my fix will not correct the issue you are reporting.

You need to remove the array initialization code you've added since this is not a fix and concentrate on figuring out why the array is empty in the first place. It stands to reason that either the address book record is not being created as it should be or a session problem is causing the query to fail, for example if $_SESSION['customer_id'] is empty.

Since you are redirecting to the login page that would indicate the latter (no valid session) but I have no idea why.

Is this a fresh install? Have you changed or added any contribs?

Let me know and I will try to help.

Jeff