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-advanced.php

    r31645 r31681  
    427427 */
    428428do_action( 'post_edit_form_tag', $post );
     429
     430$referer = wp_get_referer();
    429431?>>
    430432<?php wp_nonce_field($nonce_action); ?>
     
    435437<input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post_type ) ?>" />
    436438<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status) ?>" />
    437 <input type="hidden" id="referredby" name="referredby" value="<?php echo esc_url(wp_get_referer()); ?>" />
     439<input type="hidden" id="referredby" name="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
    438440<?php if ( ! empty( $active_post_lock ) ) { ?>
    439441<input type="hidden" id="active_post_lock" value="<?php echo esc_attr( implode( ':', $active_post_lock ) ); ?>" />
Note: See TracChangeset for help on using the changeset viewer.