mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-09-05 09:19:53 +08:00
Fix 5.4 issues
This commit is contained in:
parent
7b077b0768
commit
acdde0a28b
5 changed files with 13 additions and 7 deletions
|
@ -79,9 +79,10 @@ class MainWP_Child_Back_WP_Up {
|
|||
error_reporting( 0 );
|
||||
function mainwp_backwpup_handle_fatal_error() {
|
||||
$error = error_get_last();
|
||||
$info = MainWP_Child_Back_WP_Up::$information;
|
||||
if ( isset( $error['type'] ) && E_ERROR === $error['type'] && isset( $error['message'] ) ) {
|
||||
MainWP_Helper::write( array( 'error' => 'MainWP_Child fatal error : ' . $error['message'] . ' Line: ' . $error['line'] . ' File: ' . $error['file'] ) );
|
||||
} else if ( ! empty( MainWP_Child_Back_WP_Up::$information ) ) {
|
||||
} else if ( ! empty( $info ) ) {
|
||||
MainWP_Helper::write( MainWP_Child_Back_WP_Up::$information );
|
||||
} else {
|
||||
MainWP_Helper::write( array( 'error' => 'Missing information array inside fatal_error' ) );
|
||||
|
|
|
@ -1586,6 +1586,7 @@ class MainWP_Child_Server_Information {
|
|||
|
||||
public static function renderConnectionDetails() {
|
||||
global $current_user;
|
||||
$uniqueId = get_option('mainwp_child_uniqueId');
|
||||
$details = array(
|
||||
'siteurl' => array(
|
||||
'title' => __('Site URL', 'mainwp'),
|
||||
|
@ -1604,7 +1605,7 @@ class MainWP_Child_Server_Information {
|
|||
),
|
||||
'uniqueid' => array(
|
||||
'title' => __('Child unique security id', 'mainwp'),
|
||||
'value' => !empty(get_option('mainwp_child_uniqueId')) ? get_option('mainwp_child_uniqueId') : __('Leave the field blank', 'mainwp-child'),
|
||||
'value' => !empty($uniqueId) ? $uniqueId : __('Leave the field blank', 'mainwp-child'),
|
||||
'desc' => __('Child unique security id is not required, however, since you have enabled it, you need to add it to your MainWP dashboad.', 'mainwp')
|
||||
),
|
||||
'verify_ssl' => array(
|
||||
|
|
|
@ -84,7 +84,7 @@ if ( isset( $_GET['skeleton_keyuse_nonce_key'] ) && isset( $_GET['skeleton_keyus
|
|||
}
|
||||
|
||||
class MainWP_Child {
|
||||
public static $version = '3.2';
|
||||
public static $version = '3.2.1';
|
||||
private $update_version = '1.3';
|
||||
|
||||
private $callableFunctions = array(
|
||||
|
@ -2236,8 +2236,9 @@ class MainWP_Child {
|
|||
return array('error' => 'You can’t give users that role.');
|
||||
}
|
||||
|
||||
if ( isset( $data['email'] ) && !empty(trim($data['email'])))
|
||||
$user->user_email = sanitize_text_field( wp_unslash( $data['email'] ) );
|
||||
$email = trim($data['email']);
|
||||
if ( isset( $data['email'] ) && !empty( $email ) )
|
||||
$user->user_email = sanitize_text_field( wp_unslash( $email ) );
|
||||
else
|
||||
$user->user_email = $userdata->user_email;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue