Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Location
    Trowbridge, Wiltshire
    Posts
    121
    Plugin Contributions
    0

    Default Unknown modifier '6' in /includes/modules/additional_images.php on line 48

    Hi all,
    I am getting the following error but am not sure why....

    PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier '6' in /includes/modules/additional_images.php on line 48

    The corresponding code on line 48 is:
    if(preg_match("/" . $products_image_base . "/i", $file) == "1") {

    Can anyone point me in the right direction as to what the "unknown modifier" is?

    many thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Unknown modifier '6' in /includes/modules/additional_images.php on line 48

    You've probably got an image whose filename contains characters which are confusing the regex, such as apostrophes or square brackets or parentheses.

    See the Similar Threads section below for some related discussion.
    .

    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.

  3. #3
    Join Date
    Mar 2009
    Location
    Trowbridge, Wiltshire
    Posts
    121
    Plugin Contributions
    0

    Default Re: Unknown modifier '6' in /includes/modules/additional_images.php on line 48

    Thanks DrByte,
    firstly, apologies for late response. I have gone through the images and I did find one or two that did contain parentheses. But I am now getting another type of warning:

    preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier '3' in /includes/modules/additional_images.php on line 48.

    I cannot figure this out...however, is this a "major" problem that needs to be tracked down and fixed, or is there a way to suppress these debug files - I am getting them every couple of minutes and have to keep clearing down the cache every other day.

    I would really appreciate your steer on this.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Unknown modifier '6' in /includes/modules/additional_images.php on line 48

    Other than letters and numbers and periods, why are you using other symbols in your image filenames? Is there any reason why you can't change that?
    .

    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.

  5. #5
    Join Date
    Mar 2009
    Location
    Trowbridge, Wiltshire
    Posts
    121
    Plugin Contributions
    0

    Default Re: Unknown modifier '6' in /includes/modules/additional_images.php on line 48

    The only other symbols that i Can see are the underscore "_" and some hyphens (-).

    I will go through and change these to see if that is the problem.

    Many thanks

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Unknown modifier '6' in /includes/modules/additional_images.php on line 48

    You could change that line to say this instead (taken from v1.5.0beta):
    Code:
     if(preg_match('/\Q' . $products_image_base . '\E/i', $file) == 1) {
    .

    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.

 

 

Similar Threads

  1. v139h Error: Unknown modifier '$' in main_product_image.php
    By divinelighting in forum General Questions
    Replies: 12
    Last Post: 27 Sep 2012, 10:26 AM
  2. preg_replace(): Unknown modifier 'h' in layout_controller.php
    By rashuweb in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 4 May 2011, 01:47 PM
  3. Replies: 2
    Last Post: 3 May 2010, 08:39 PM
  4. Additional_Images.php Line 16-display link if no large
    By Donn in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 18 Oct 2007, 05:10 PM
  5. Replies: 1
    Last Post: 30 Sep 2006, 02:28 AM

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