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/edit-form-comment.php

    r31641 r31681  
    169169do_meta_boxes(null, 'normal', $comment);
    170170
     171$referer = wp_get_referer();
    171172?>
    172173</div>
     
    174175<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID) ?>" />
    175176<input type="hidden" name="p" value="<?php echo esc_attr($comment->comment_post_ID) ?>" />
    176 <input name="referredby" type="hidden" id="referredby" value="<?php echo esc_url( wp_get_referer() ); ?>" />
     177<input name="referredby" type="hidden" id="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
    177178<?php wp_original_referer_field(true, 'previous'); ?>
    178179<input type="hidden" name="noredir" value="1" />
Note: See TracChangeset for help on using the changeset viewer.