WordPress.org

Making WordPress.org

Changeset 10249


Ignore:
Timestamp:
09/11/2020 04:41:52 PM (7 weeks ago)
Author:
iandunn
Message:

Events: Check location parts before counting to fix warning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/events/1.0/index.php

    r10236 r10249  
    272272     */
    273273    $location_name_parts = preg_split( '/\s+/u', $location_name );
    274     $location_word_count = count( $location_name_parts );
     274    $location_word_count = is_array( $location_name_parts ) ? count( $location_name_parts ) : 1;
    275275
    276276    if ( ! $guess && $location_word_count >= 2 ) {
Note: See TracChangeset for help on using the changeset viewer.