Make WordPress Core


Ignore:
Timestamp:
03/09/2015 02:10:36 AM (11 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/network/themes.php

    r31200 r31681  
    175175                    <?php submit_button( _n( 'Yes, Delete this theme', 'Yes, Delete these themes', $themes_to_delete ), 'button', 'submit', false ); ?>
    176176                </form>
    177                 <form method="post" action="<?php echo esc_url(wp_get_referer()); ?>" style="display:inline;">
     177                <?php
     178                $referer = wp_get_referer();
     179                ?>
     180                <form method="post" action="<?php echo $referer ? esc_url( $referer ) : ''; ?>" style="display:inline;">
    178181                    <?php submit_button( __( 'No, Return me to the theme list' ), 'button', 'submit', false ); ?>
    179182                </form>
Note: See TracChangeset for help on using the changeset viewer.