Following an address book update by editing a default address in My Account, the function zen_address_label returns the old address, even though the address book table is updated. The new address was correctly displayed after submitting the address change. Consider the following code fragment located after the address book table is updated with the new address:
Code:
$new_address = zen_address_label($cID, $default_address_id);
$address_query = "select entry_firstname as firstname, entry_lastname as lastname,
    entry_company as company, entry_street_address as street_address,
    entry_suburb as suburb, entry_city as city, entry_postcode as postcode,
    entry_state as state, entry_zone_id as zone_id,
    entry_country_id as country_id
    from " . TABLE_ADDRESS_BOOK . "
    where customers_id = " . (int)$cID . "
    and address_book_id = " . (int)$default_address_id;

$address = $db->Execute($address_query);
var_dump($address);
die ($new_address);
Line 1 gets the formatted address for the given customers id and address book id. The following query is the same query as in the function. Finally, I dump the results of the query, and show what the function returns.

This code outputs the following:
object(queryFactoryResult)#77 (10) { ["EOF"]=> bool(false) ["cursor"]=> int(0) ["fields"]=> array(10) { ["firstname"]=> string(2) "My" ["lastname"]=> string(4) "Name" ["company"]=> NULL ["street_address"]=> string(14) "230 Bernard St" ["suburb"]=> string(0) "" ["city"]=> string(8) "Westmead" ["postcode"]=> string(8) "DN18 4HU" ["state"]=> string(12) "Lincolnshire" ["zone_id"]=> string(1) "0" ["country_id"]=> string(3) "222" } ["is_cached"]=> bool(false) ["result"]=> array(0) { } ["result_random"]=> NULL ["limit"]=> NULL ["resource"]=> object(mysqli_result)#78 (5) { ["current_field"]=> int(0) ["field_count"]=> int(10) ["lengths"]=> array(10) { [0]=> int(2) [1]=> int(4) [2]=> int(0) [3]=> int(14) [4]=> int(0) [5]=> int(8) [6]=> int(8) [7]=> int(12) [8]=> int(1) [9]=> int(3) } ["num_rows"]=> int(1) ["type"]=> int(0) } ["link"]=> object(mysqli)#8 (19) { ["affected_rows"]=> int(1) ["client_info"]=> string(79) "mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $" ["client_version"]=> int(50012) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(10) ["host_info"]=> string(25) "Localhost via UNIX socket" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(6) "5.7.26" ["server_version"]=> int(50726) ["stat"]=> string(141) "Uptime: 273991 Threads: 1 Questions: 120525 Slow queries: 0 Opens: 46874 Flush tables: 1 Open tables: 64 Queries per second avg: 0.439" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(7951) ["warning_count"]=> int(0) } ["sql_query"]=> string(378) "select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from address_book where customers_id = 472 and address_book_id = 684" } My Name 430 Bernard St Westmead Lincolnshire DN18 4HU United Kingdom

The first highlighted portion shows the result of the query showing the new street address. The second highlighted portion shows zen_address_label returns the old street number.

Version 1.5.6c code for the function is the same except some notifiers were added. So I would expect the same behavior in that version.
I hope someone can replicate this error.

Dave
zc v155f, lots of addons and custom code, php 7.1.xx