Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 26be5ee

Browse files
committed
Fix phpcs issues and code format
1 parent 638d18c commit 26be5ee

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

admin/rt-retranscode-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ public function ajax_process_retranscode_request() {
625625
)
626626
) {
627627
// translators: Media id of the invalid media type.
628-
die( wp_json_encode( array( 'error' => sprintf( __( 'Sending Failed: %s is an invalid media ID/type.', 'transcoder' ), esc_html( $id ) ) ) ) );
628+
die( wp_json_encode( array( 'error' => sprintf( __( 'Sending Failed: %d is an invalid media ID/type.', 'transcoder' ), intval( $id ) ) ) ) );
629629
}
630630

631631
if ( 'audio/mpeg' === $media->post_mime_type ) {

admin/rt-transcoder-admin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,10 @@ public function edit_video_thumbnail_( $form_fields, $post ) {
375375
* @return array $form_fields
376376
*/
377377
public function save_video_thumbnail( $post ) {
378+
378379
$rtmedia_thumbnail = transcoder_filter_input( INPUT_POST, 'rtmedia-thumbnail', FILTER_SANITIZE_STRING );
379-
$id = $post['ID'];
380+
$id = ( ! empty( $post['ID'] ) && 0 < intval( $post['ID'] ) ) ? intval( $post['ID'] ) : 0;
381+
380382
if ( isset( $rtmedia_thumbnail ) ) {
381383
if ( class_exists( 'rtMedia' ) ) {
382384
$file_url = $rtmedia_thumbnail;

0 commit comments

Comments
 (0)