mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 06:29:30 +00:00
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:
parent
f7eed7e832
commit
8545387795
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user