Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/sitepres.../inc
File: functions-security.php
<?php
[0] Fix | Delete
[1] Fix | Delete
function wpml_get_authenticated_action() {
[2] Fix | Delete
[3] Fix | Delete
$action = filter_input( INPUT_POST, 'icl_ajx_action' );
[4] Fix | Delete
$action = $action ? $action : filter_input( INPUT_POST, 'action' );
[5] Fix | Delete
$nonce = $action ? filter_input( INPUT_POST, '_icl_nonce' ) : null;
[6] Fix | Delete
if ( $nonce === null || $action === null ) {
[7] Fix | Delete
$action = filter_input( INPUT_GET, 'icl_ajx_action' );
[8] Fix | Delete
$nonce = $action ? filter_input( INPUT_GET, '_icl_nonce' ) : null;
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
$authenticated_action = $action && wp_verify_nonce( (string) $nonce, $action . '_nonce' ) ? $action : null;
[12] Fix | Delete
[13] Fix | Delete
return $authenticated_action;
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* Validates a nonce according to the schema also used by \wpml_nonce_field
[18] Fix | Delete
*
[19] Fix | Delete
* @param string $action
[20] Fix | Delete
*
[21] Fix | Delete
* @return false|int
[22] Fix | Delete
*/
[23] Fix | Delete
function wpml_is_action_authenticated( $action ) {
[24] Fix | Delete
$nonce = isset( $_POST['_icl_nonce'] ) ? $_POST['_icl_nonce'] : '';
[25] Fix | Delete
if ( '' !== $nonce ) {
[26] Fix | Delete
$action = $action . '_nonce';
[27] Fix | Delete
} else {
[28] Fix | Delete
$nonce = isset( $_POST['nonce'] ) ? $_POST['nonce'] : '';
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
return wp_verify_nonce( $nonce, $action );
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
/**
[35] Fix | Delete
* Generates HTML for the hidden nonce input field following the schema
[36] Fix | Delete
* used by \wpml_is_action_authenticated
[37] Fix | Delete
*
[38] Fix | Delete
* @param string $action
[39] Fix | Delete
*
[40] Fix | Delete
* @return string
[41] Fix | Delete
*/
[42] Fix | Delete
function wpml_nonce_field( $action ) {
[43] Fix | Delete
return '<input name="_icl_nonce" type="hidden" value="'
[44] Fix | Delete
. wp_create_nonce( $action . '_nonce' ) . '"/>';
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* RFC 4122 compliant UUID version 5.
[49] Fix | Delete
*
[50] Fix | Delete
* @param string $name The name to generate the UUID from.
[51] Fix | Delete
* @param string $ns_uuid Namespace UUID. Default is for the NS when name string is a URL.
[52] Fix | Delete
*
[53] Fix | Delete
* @return string The UUID string.
[54] Fix | Delete
*/
[55] Fix | Delete
if ( ! function_exists( 'uuid_v5' ) ) {
[56] Fix | Delete
function uuid_v5( $name, $ns_uuid = '6ba7b811-9dad-11d1-80b4-00c04fd430c8' ) {
[57] Fix | Delete
$wpml_uuid = new WPML_UUID();
[58] Fix | Delete
return $wpml_uuid->get_uuid_v5( $name, $ns_uuid );
[59] Fix | Delete
}
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
/**
[63] Fix | Delete
* This function was introduced in WP 4.7.0
[64] Fix | Delete
* Generate a random UUID (version 4).
[65] Fix | Delete
*
[66] Fix | Delete
* @return string UUID.
[67] Fix | Delete
*/
[68] Fix | Delete
if ( ! function_exists( 'wp_generate_uuid4' ) ) {
[69] Fix | Delete
function wp_generate_uuid4() {
[70] Fix | Delete
return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
[71] Fix | Delete
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
[72] Fix | Delete
mt_rand( 0, 0xffff ),
[73] Fix | Delete
mt_rand( 0, 0x0fff ) | 0x4000,
[74] Fix | Delete
mt_rand( 0, 0x3fff ) | 0x8000,
[75] Fix | Delete
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
[76] Fix | Delete
);
[77] Fix | Delete
}
[78] Fix | Delete
}
[79] Fix | Delete
[80] Fix | Delete
/**
[81] Fix | Delete
* @param string $object_id
[82] Fix | Delete
* @param string $object_type
[83] Fix | Delete
* @param int|null $timestamp If this parameter is `null`, it will be assigned the current time
[84] Fix | Delete
* Set this parameter to 0 if the uuid should not have a time footprint
[85] Fix | Delete
*
[86] Fix | Delete
* @return string
[87] Fix | Delete
*/
[88] Fix | Delete
function wpml_uuid( $object_id, $object_type, $timestamp = null ) {
[89] Fix | Delete
$wpml_uuid = new WPML_UUID();
[90] Fix | Delete
return $wpml_uuid->get( $object_id, $object_type, $timestamp );
[91] Fix | Delete
}
[92] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function