Make WordPress Core


Ignore:
Timestamp:
03/09/2015 02:10:36 AM (10 years ago)
Author:
wonderboymusic
Message:

There are a few functions that have the ability to return false instead of a string, so the return value should be checked before being passed to functions that expect string.

These are trivial, but they clear out some Scrutinizer issues.

See #30799.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r31392 r31681  
    12211221    if ( $ptype->hierarchical ) {
    12221222        $uri = get_page_uri($post);
    1223         $uri = untrailingslashit($uri);
    1224         $uri = strrev( stristr( strrev( $uri ), '/' ) );
    1225         $uri = untrailingslashit($uri);
     1223        if ( $uri ) {
     1224            $uri = untrailingslashit($uri);
     1225            $uri = strrev( stristr( strrev( $uri ), '/' ) );
     1226            $uri = untrailingslashit($uri);
     1227        }
    12261228
    12271229        /** This filter is documented in wp-admin/edit-tag-form.php */
Note: See TracChangeset for help on using the changeset viewer.