On 1.10 for drupal 5 we noticed that the addresses were blank on the invoices. I checked the templates and then started going back through the functions to see where the address was turning blank. It was in the function uc_address_format. There is a regular expression for removing duplicate
tags that it looks like changed in a recent version. It was using
and now was using
but the slash wasn't escaped in the regular expression. I fixed it on my server by changing the line from this:

  $match = array('/^<br />/', '/<br />$/', '/<br />(\s*|[\s*<br />\s*]+)<br />/', '/<br /><br />/', '`<br />, N/A`');

to this:

  $match = array('/^<br \/>/', '/<br \/>$/', '/<br \/>(\s*|[\s*<br \/>\s*]+)<br \/>/', '/<br \/><br \/>/', '`<br \/>, N/A`');

I started to check to create a patch but I saw the line is changed in dev to this:

  $match = array('`^<br( /)?>`', '`<br( /)?>$`', '`<br( /)?>(\s*|[\s*<br( /)?>\s*]+)<br( /)?>`', '`<br( /)?><br( /)?>`', '`<br( /)?>, N/A`');

I tried that fix and it also worked on my server.
This is all around line 2040 in uc_store.module

This looks like it is already fixed, but isn't in the current release of the 5.x branch.

-Ed

Comments

tr’s picture