summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2020-02-17 11:55:41 -0500
committerAnthony G. Basile <blueness@gentoo.org>2020-02-17 11:55:41 -0500
commitdd791649a46b33fd7d5ea388fa42f1cf99c82884 (patch)
treeddc745e49425b01732343da42a19018b7dd737c4 /plugins/jetpack/json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php
parentRemove extraneous .zip (diff)
downloadblogs-gentoo-dd791649a46b33fd7d5ea388fa42f1cf99c82884.tar.gz
blogs-gentoo-dd791649a46b33fd7d5ea388fa42f1cf99c82884.tar.bz2
blogs-gentoo-dd791649a46b33fd7d5ea388fa42f1cf99c82884.zip
update jetpack 8.2.1
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php')
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php
index 88c448e8..773bf8e1 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php
@@ -345,10 +345,10 @@ class WPCOM_JSON_API_Edit_Media_v1_2_Endpoint extends WPCOM_JSON_API_Update_Medi
$input = $this->input( true );
- // images
- $media_file = $input['media'] ? (array) $input['media'] : null;
- $media_url = $input['media_url'];
- $media_attrs = $input['attrs'] ? (array) $input['attrs'] : null;
+ // Images.
+ $media_file = isset( $input['media'] ) ? (array) $input['media'] : null;
+ $media_url = isset( $input['media_url'] ) ? $input['media_url'] : null;
+ $media_attrs = isset( $input['attrs'] ) ? (array) $input['attrs'] : null;
if ( isset( $media_url ) || $media_file ) {
$user_can_upload_files = current_user_can( 'upload_files' ) || $this->api->is_authorized_with_upload_token();
@@ -425,4 +425,3 @@ class WPCOM_JSON_API_Edit_Media_v1_2_Endpoint extends WPCOM_JSON_API_Update_Medi
return $response;
}
}
-