From 4f61d7288c3f1126e437f5c35ac4408ba5b3d0d8 Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Mon, 23 Jan 2017 21:21:13 +0800 Subject: [PATCH] Fix WPML fatal error issue --- core/um-logout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/um-logout.php b/core/um-logout.php index 6d6d7d3f..7a9b4e38 100644 --- a/core/um-logout.php +++ b/core/um-logout.php @@ -36,7 +36,7 @@ class UM_Logout { $has_translation = true; - if( function_exists('icl_object_id') && defined('ICL_LANGUAGE_CODE') ){ // checks if WPML exists + if( function_exists('icl_object_id') && defined('ICL_LANGUAGE_CODE') && isset( $sitepress ) ){ // checks if WPML exists $trid = $sitepress->get_element_trid( $current_page_ID ); }