Fatal error: Call to undefined function: str_ireplace()

Some older PHP versions do not support the str_ireplace function. If you are using the most current Deluxe version files on a system which doesn't support this function, you are probably receiving an error similar to this:

Fatal error: Call to undefined function: str_ireplace() in ..../shop/inc/open.php on line 36

Make the following changes to the /inc/open.php page.

  1. Find the line:

    if (str_ireplace($die_if_words, "", $fieldvalue) != $fieldvalue)

    which handles case insensitive search/replaces

  2. Change this line to:

    if (str_replace($die_if_words, "", strtolower($fieldvalue)) != strtolower($fieldvalue))