Making WordPress.org

Changeset 7701


Ignore:
Timestamp:
09/24/2018 11:24:55 PM (6 years ago)
Author:
iandunn
Message:

WordCamp Post Type: Compare address to array item to avoid false negative.

r7629 fixed a bug where update_venue_address() was incorrectly returning early, but also introduced a bug where the new condition is always false, so it would never return early.

$original_meta_values is an array, so we need to compare $new_address to the first item, rather than the entire array.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php

    r7670 r7701  
    154154            // If the venue address was changed, update its coordinates
    155155            $new_address = $_POST[ wcpt_key_to_str( 'Physical Address', 'wcpt_' ) ];
    156             if ( $new_address === $original_meta_values['Physical Address'] ) {
     156            if ( $new_address === $original_meta_values['Physical Address'][0] ) {
    157157                return;
    158158            }
Note: See TracChangeset for help on using the changeset viewer.