Prevent a notice if $_REQUEST['post_id'] is missing. Just use 0 in this case, which will be the same as using intval on an undefined value.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nbachiyski 2010-05-27 11:42:46 +00:00
parent f7eed7e832
commit 8545387795
1 changed files with 1 additions and 1 deletions

View File

@ -1532,7 +1532,7 @@ SWFUpload.onload = function() {
function media_upload_type_form($type = 'file', $errors = null, $id = null) {
media_upload_header();
$post_id = intval($_REQUEST['post_id']);
$post_id = isset( $_REQUEST['post_id'] )? intval( $_REQUEST['post_id'] ) : 0;
$form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id");
$form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);