From 8211972c171dfac7850e8cbdda3561e479b9e5b5 Mon Sep 17 00:00:00 2001 From: yuriinalivaiko Date: Wed, 11 May 2022 21:45:56 +0300 Subject: [PATCH 1/2] - fixed Call to a member function is_block_editor() on null --- includes/admin/core/class-admin-enqueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/core/class-admin-enqueue.php b/includes/admin/core/class-admin-enqueue.php index 56cf089c..659cfaa7 100644 --- a/includes/admin/core/class-admin-enqueue.php +++ b/includes/admin/core/class-admin-enqueue.php @@ -657,7 +657,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) { global $wp_version, $current_screen; if ( version_compare( $wp_version, '5.0', '>=' ) ) { - if ( $current_screen->is_block_editor() ) { + if ( isset( $current_screen ) && $current_screen->is_block_editor() ) { $this->load_gutenberg_js(); $this->load_gutenberg_shortcode_blocks(); } From 6794aa2bb4422f4875af6777e82c2917d7df1901 Mon Sep 17 00:00:00 2001 From: yuriinalivaiko Date: Fri, 20 May 2022 23:12:59 +0300 Subject: [PATCH 2/2] - fixed glob function --- includes/core/class-uploader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/class-uploader.php b/includes/core/class-uploader.php index 8bd609df..b8735dc3 100644 --- a/includes/core/class-uploader.php +++ b/includes/core/class-uploader.php @@ -383,7 +383,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) { ?> */ $movefile = apply_filters( 'um_upload_image_result', $movefile, $user_id, $field_data ); - + /** * Resize and compress images uploaded by the field "Image Upload" without crop. * Resize and compress images uploaded on Activity wall and Group Discussion wall. @@ -1361,7 +1361,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) { } } - $files = glob( UM()->uploader()->get_upload_base_dir() . $user_id . DIRECTORY_SEPARATOR . '*', GLOB_BRACE ); + $files = glob( UM()->uploader()->get_upload_base_dir() . $user_id . DIRECTORY_SEPARATOR . '*' ); if ( ! empty( $files ) ) { foreach ( $files as $file ) { $str = basename( $file );