Jump to content

MiWBC

New Members
  • Posts

    2
  • Joined

  • Last visited

MiWBC's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can anyone help me with this - I don't normally do coding. I've just moved an old site onto new hosting and I'm getting this message: Deprecated: Function ereg_replace() is deprecated The code looks like this: if( preg_match( '/sl/i', $sOption ) ) $sContent = addslashes( $sContent ); else $sContent = stripslashes( $sContent ); $sContent = ereg_replace( "\r", '', $sContent ); if( preg_match( '/len/i', $sOption ) ) $sContent = checkLengthOfTxt( $sContent ); I changed it to look like this: if( preg_match( '/sl/i', $sOption ) ) $sContent = addslashes( $sContent ); else $sContent = stripslashes( $sContent ); $sContent = preg_replace( "\r", '', $sContent ); if( preg_match( '/len/i', $sOption ) ) $sContent = checkLengthOfTxt( $sContent ); But now get this warning message: Warning: preg_replace() [function.preg-replace]: Empty regular expression I didn't build the site so I don't even know what the script is trying to do - forgive my ignorance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.