From 2a34019725f2484af974da5efdd89632f508f5fd Mon Sep 17 00:00:00 2001 From: Abdus Fauzi Date: Sat, 1 Jul 2017 21:53:05 +0800 Subject: [PATCH] Fix error missing wp-load.php Fix for missing wp-load.php when the script went up the directory to look for wp-load.php. Refer: ultimatemember#280 --- core/lib/upload/um-image-upload.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/core/lib/upload/um-image-upload.php b/core/lib/upload/um-image-upload.php index 9145c458..c73ebaec 100644 --- a/core/lib/upload/um-image-upload.php +++ b/core/lib/upload/um-image-upload.php @@ -1,12 +1,24 @@ $value ) { + $wp_load = "{$value}/wp-load.php"; + if ( file_exists( $wp_load ) ) { + break; + } + } +} + require_once( $wp_load ); global $ultimatemember;