Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2014
    Location
    Doncaster, Melbourne, Australia
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Deprecated message repeated on page

    I have two "purchase" buttons on my site. Both take a visitor to the purchase page but the side menu button give the repeated message at the top of the purchase page as follows:

    Deprecated:function eregi() is deprecated in/home/antony/public_html/osc/includes/classes/language.php on line 87

    The page does work and the error message only comes up the first time you access the page

    Line 87 reads

    if (eregi('^(' . $value . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {

    This is too subtle/advanced for me as a raw learner. Can anyone please see and obvious error? Many thanks in anticipation

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    You should get rid of the eregi() call from the script - it was deprecated quite a while ago and is likely to be removed soon.

    possible replacements are str_replace() or preg_replace()
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •