Making WordPress.org

Changeset 3785


Ignore:
Timestamp:
08/09/2016 03:35:55 PM (5 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Ensure variable has value before checking its first character.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/formatting.php

    r3233 r3785  
    273273    public static function autolink_references( $text ) {
    274274        // Temporary: Don't do anything if the text is a hash notation string.
    275         if ( '{' === $text[0] ) {
     275        if ( $text && '{' === $text[0] ) {
    276276            return $text;
    277277        }
     
    422422    public static function fix_param_hash_formatting( $text ) {
    423423        // Don't do anything if this isn't a hash notation string.
    424         if ( '{' != $text[0] ) {
     424        if ( ! $text || '{' != $text[0] ) {
    425425            return $text;
    426426        }
Note: See TracChangeset for help on using the changeset viewer.