Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    5,006
    Plugin Contributions
    6

    Default Is this a correct code change for PHP 5.3?

    File has
    $value = ereg_replace("[\r\n\t ]+",' ',$value);
    Changed to
    $value = preg_replace("/[\r\n\t ]+/",' ',$value);
    Am I on the right track?
    Not getting any errors, but wanted to check before submitting a change to a mod.
    Did you read the posting tips?!?
    Things We've Done
    MOD: Scheduled Events

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    20,981
    Plugin Contributions
    25

    Default Re: Is this a correct code change for PHP 5.3?

    It looks correct to me.

  3. #3
    Join Date
    Jan 2004
    Posts
    58,288
    Blog Entries
    3
    Plugin Contributions
    106

    Default Re: Is this a correct code change for PHP 5.3?

    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    5,006
    Plugin Contributions
    6

    Default Re: Is this a correct code change for PHP 5.3?

    Yep, saw the blog when it was posted but the example was a little different. Was having no errors in testing but thought I'd throw it out before posting the change.

    Great info DrByte!
    THANX
    Did you read the posting tips?!?
    Things We've Done
    MOD: Scheduled Events

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    5,006
    Plugin Contributions
    6

    Default Re: Is this a correct code change for PHP 5.3?

    And thanx to Glenn for taking a look.

    Another check to verify I'm reading correctly....
    split('|'),0,{})
    in .js would become
    explode('|'),0,{})
    Or am I in the wrong ballpark?
    Did you read the posting tips?!?
    Things We've Done
    MOD: Scheduled Events

  6. #6
    Join Date
    Jan 2004
    Posts
    58,288
    Blog Entries
    3
    Plugin Contributions
    106

    Default Re: Is this a correct code change for PHP 5.3?

    If that's truly javascript and not PHP then there probably is no need to change it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    5,006
    Plugin Contributions
    6

    Default Re: Is this a correct code change for PHP 5.3?

    It's at the end of a compressed .js file so I'm not really able to tell. I'll defer to no change for now.
    THANX again.
    Did you read the posting tips?!?
    Things We've Done
    MOD: Scheduled Events

  8. #8
    Join Date
    Jun 2010
    Location
    Norwich, UK
    Posts
    67
    Plugin Contributions
    0

    Default Re: Is this a correct code change for PHP 5.3?

    If it's a .js file then it's javascript, not PHP so no worries about PHP5.3 for that one.
    UK Web Hosting for Designers & Developers by TerraNetwork (Norwich, UK) for websites of all sizes.
    Zen Cart Web Hosting from £3.33 per month
    Contact info AT terranetwork DOT net for quotes and advice

 

 

Similar Threads

  1. how to change this two osc code into zc code?
    By sunrise99 in forum General Questions
    Replies: 3
    Last Post: 21 Nov 2011, 05:30 AM
  2. changed code for hovering large image. Is it correct?
    By fsas in forum General Questions
    Replies: 1
    Last Post: 18 Oct 2008, 09:27 PM
  3. Where is this PHP code for shop cart?
    By artcoder in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Apr 2007, 08:43 PM
  4. Is this lne of code in payment.php correct
    By IanEtche in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 4 Dec 2006, 07:18 PM

Bookmarks

Posting Permissions

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