[CodeFactor] Apply fixes to commit 1a6d2a0

[ci skip] [skip ci]
This commit is contained in:
codefactor-io 2020-06-10 13:04:06 +00:00
parent 1a6d2a027a
commit 6e30b24c82

View file

@ -974,7 +974,7 @@ class MainWP_Child_Posts {
$post_gallery_images = unserialize( base64_decode( $_POST['post_gallery_images'] ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode function is used for http encode compatible..
if ( is_array( $post_gallery_images ) ) {
foreach ( $post_gallery_images as $gallery ) {
if \Exception( isset( $gallery['src'] ) ) {
if \ Exception( isset( $gallery['src'] ) ) {
try {
$upload = MainWP_Utility::upload_image( $gallery['src'], $gallery ); // Upload image to WP.
if ( null !== $upload ) {