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/clone/wp-conte.../themes/Divi/includes/builder/tests/codecept.../wpunit
File: Translations.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace ET\Builder\Codeception\WPUnit;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Records how many time gettext is called for the same string.
[5] Fix | Delete
*
[6] Fix | Delete
* @since 4.4.9
[7] Fix | Delete
*/
[8] Fix | Delete
class Translations {
[9] Fix | Delete
protected static $stats = array();
[10] Fix | Delete
[11] Fix | Delete
public static function gettext( $translation, $text, $domain ) {
[12] Fix | Delete
if ( isset( self::$stats[ $domain ][ $text ] ) ) {
[13] Fix | Delete
self::$stats[ $domain ][ $text ] += 1;
[14] Fix | Delete
} else {
[15] Fix | Delete
self::$stats[ $domain ][ $text ] = 1;
[16] Fix | Delete
}
[17] Fix | Delete
return $translation;
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
public static function gettext_with_context( $translation, $text, $context, $domain ) {
[21] Fix | Delete
return self::gettext( $translation, $text, $domain );
[22] Fix | Delete
}
[23] Fix | Delete
[24] Fix | Delete
public static function stats() {
[25] Fix | Delete
return self::$stats;
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
public static function add_filters() {
[29] Fix | Delete
// Add gettext filters.
[30] Fix | Delete
add_filter( 'gettext', __CLASS__ . '::gettext', 99, 3 );
[31] Fix | Delete
add_filter( 'gettext_with_context', __CLASS__ . '::gettext_with_context', 99, 4 );
[32] Fix | Delete
}
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
Translations::add_filters();
[36] Fix | Delete
[37] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function