Making WordPress.org


Ignore:
Timestamp:
06/15/2022 11:53:36 PM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Switch to using str_starts_with() in the SVN class.

Props sunxiyuan.
Closes https://github.com/WordPress/wordpress.org/pull/74.
Fixes #6364.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-svn.php

    r10207 r11918  
    445445
    446446                        // Prefix options with `-` or `--` if they're longer than 2 characters.
    447                         if ( '-' != substr( $key, 0, 1 ) ) {
     447                        if ( ! str_starts_with( $key, '-' ) ) {
    448448                                $key = '-' . ( strlen( $key ) > 2 ? '-' : '' ) . $key;
    449449                        }
Note: See TracChangeset for help on using the changeset viewer.