Make WordPress Core


Ignore:
Timestamp:
09/19/2023 12:23:16 PM (14 months ago)
Author:
costdev
Message:

Coding Standards: Replace PHP alias join() with implode().

In [52190], some new instances of the join() alias were introduced in the test suite.

Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.

This replaces the new join() uses with the canonical implode() function name.

Follow-up to [46182], [49193], [49805], [52190].

Props david.binda, mukesh27.
Fixes #59389.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media/getPostGalleries.php

    r56548 r56616  
    576576        }
    577577
    578         $ids_joined = join( ',', $ids );
     578        $ids_joined = implode( ',', $ids );
    579579
    580580        $global_post_id = self::factory()->post->create(
     
    845845        }
    846846
    847         $ids1_joined = join( ',', array_slice( $ids, 0, 3 ) );
    848         $ids2_joined = join( ',', array_slice( $ids, 3, 3 ) );
     847        $ids1_joined = implode( ',', array_slice( $ids, 0, 3 ) );
     848        $ids2_joined = implode( ',', array_slice( $ids, 3, 3 ) );
    849849
    850850        $blob = <<<BLOB
     
    908908        }
    909909
    910         $ids1_joined = join( ',', array_slice( $ids, 0, 3 ) );
    911         $ids2_joined = join( ',', array_slice( $ids, 3, 3 ) );
     910        $ids1_joined = implode( ',', array_slice( $ids, 0, 3 ) );
     911        $ids2_joined = implode( ',', array_slice( $ids, 3, 3 ) );
    912912        $blob        = <<<BLOB
    913913[gallery ids="$ids1_joined" type="type" foo="bar"]
Note: See TracChangeset for help on using the changeset viewer.