WordPress.org

Make WordPress Core

Changeset 14987


Ignore:
Timestamp:
05/27/2010 11:42:46 AM (8 years ago)
Author:
nbachiyski
Message:

Prevent a notice if $_REQUESTpost_id? is missing. Just use 0 in this case, which will be the same as using intval on an undefined value.

File:
1 edited

Legend:

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

    r14930 r14987  
    15331533    media_upload_header();
    15341534
    1535     $post_id = intval($_REQUEST['post_id']);
     1535    $post_id = isset( $_REQUEST['post_id'] )? intval( $_REQUEST['post_id'] ) : 0;
    15361536
    15371537    $form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id");
Note: See TracChangeset for help on using the changeset viewer.