Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,107
    Plugin Contributions
    11

    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.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    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
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

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

    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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
    9,107
    Plugin Contributions
    11

    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

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,107
    Plugin Contributions
    11

    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?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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
    9,107
    Plugin Contributions
    11

    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.

  8. #8
    Join Date
    Jun 2010
    Location
    Austria
    Posts
    115
    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.

 

 

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR