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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wpforms-.../src/Admin/Tools/Importer...
File: NinjaForms.php
[500] Fix | Delete
/**
[501] Fix | Delete
* Replace 3rd-party form provider tags/shortcodes with our own Smart Tags.
[502] Fix | Delete
*
[503] Fix | Delete
* @since 1.6.6
[504] Fix | Delete
*
[505] Fix | Delete
* @param string $string Text to look for Smart Tags in.
[506] Fix | Delete
* @param array $fields List of fields to process Smart Tags in.
[507] Fix | Delete
*
[508] Fix | Delete
* @return string
[509] Fix | Delete
*/
[510] Fix | Delete
public function get_smarttags( $string, $fields ) {
[511] Fix | Delete
[512] Fix | Delete
preg_match_all( '/\{(.+?)\}/', $string, $tags );
[513] Fix | Delete
[514] Fix | Delete
if ( empty( $tags[1] ) ) {
[515] Fix | Delete
return $string;
[516] Fix | Delete
}
[517] Fix | Delete
[518] Fix | Delete
foreach ( $tags[1] as $tag ) {
[519] Fix | Delete
[520] Fix | Delete
$tag_formatted = str_replace( 'field:', '', $tag );
[521] Fix | Delete
[522] Fix | Delete
foreach ( $fields as $field ) {
[523] Fix | Delete
if ( ! empty( $field['nf_key'] ) && $field['nf_key'] === $tag_formatted ) {
[524] Fix | Delete
$string = str_replace( '{' . $tag . '}', '{field_id="' . $field['id'] . '"}', $string );
[525] Fix | Delete
}
[526] Fix | Delete
}
[527] Fix | Delete
[528] Fix | Delete
if ( in_array( $tag, [ 'wp:admin_email', 'system:admin_email' ], true ) ) {
[529] Fix | Delete
$string = str_replace( [ '{wp:admin_email}', '{system:admin_email}' ], '{admin_email}', $string );
[530] Fix | Delete
}
[531] Fix | Delete
[532] Fix | Delete
if ( $tag === 'all_fields_table' || $tag === 'fields_table' ) {
[533] Fix | Delete
$string = str_replace( '{' . $tag . '}', '{all_fields}', $string );
[534] Fix | Delete
}
[535] Fix | Delete
}
[536] Fix | Delete
[537] Fix | Delete
return $string;
[538] Fix | Delete
}
[539] Fix | Delete
}
[540] Fix | Delete
[541] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function