Hi

I get this error;

Warning: No ending delimiter found in functions.php3 on line 1561.

where i am using this command preg_replace().

Any help would be most appriciated.

Thanks Anand

    • [deleted]

    It means you did not put an ending delimiter in your regular expression.

    what is complete line with the regular expression?

      This is the function im using;

      function own_stripslashes($string)
      {
      $find = array(
      '/\\\'/', // \\'
      '/\\/', // \
      '/\\'/', // \'
      '/\\"/'); // \"
      $replace = array(
      '\'', // \
      '\', // \
      '\'', // '
      '"'); // "
      return preg_replace($find, $replace, $string);
      }

      Ive used the preg_replace() before in this file, but its just comes up with the error only on that line.

      Thanks Anand

        jaysus. What are you trying to do with the code? There's probably an easier way to do it 😉

          • [deleted]

          Well it doesn't surprise me.
          There are more slashes in there than is humanly possbile to type in a week :-)
          At first glance (assuming the forum didn't F-up any slashes) you seem to be missing a few quotes, which will alter the patterns, which is bound to make some delimiters disappear.

          And like Dave said, what are you trying to do? There's bound to be an easier way than this...

            Hi guys,

            I don't really know what this codedoes either
            Its a part of the phpBB messageboard system (www.phpbb.com), which i have uploaded to my site.

            I got the problem in the functions.php file, and i think it has something to do with the version of php that my server is running. i.e. 3.0.14.

            Thanks Anand

              Write a Reply...