Skip to content

Commit

Permalink
Fix PHP deprecated notice
Browse files Browse the repository at this point in the history
Fixes #7182
  • Loading branch information
sc0ttkclark committed Sep 28, 2023
1 parent e96a59a commit 679a2dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/fields/wysiwyg.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,10 @@ public function input( $name, $value = null, $options = null, $pod = null, $id =
$value = $this->normalize_value_for_input( $value, $options, "\n" );

// Normalize the line breaks for React.
$value = str_replace( "\r\n", "\n", $value );
$value = str_replace( "\r", "\n", $value );
if ( null !== $value ) {
$value = str_replace( "\r\n", "\n", $value );
$value = str_replace( "\r", "\n", $value );
}

if ( isset( $options['name'] ) && ! pods_permission( $options ) ) {
if ( pods_v( 'read_only', $options, false ) ) {
Expand Down

0 comments on commit 679a2dd

Please sign in to comment.