Forums / General Questions / function.preg-match error with additional_images.php

function.preg-match error with additional_images.php

Results 1 to 6 of 6
23 Dec 2010, 18:08
#1
digitalshadow avatar

digitalshadow

Totally Zenned

Join Date:
Mar 2009
Posts:
616
Plugin Contributions:
0

function.preg-match error with additional_images.php

PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unmatched parentheses at offset 31 in [PATH]/additional_images.php on line 54

What could cause that?

This is line 54

if(preg_match("/" . $products_image_base . "/i", $file) == 1) {



v1.3.8a
23 Dec 2010, 18:30
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: function.preg-match error with additional_images.php

unmatched parentheses at offset 31

This would be in the $products_image_base content. Could there be any parentheses in the filename? Or could the code that derives $products_image_base have gotten corrupted?
23 Dec 2010, 20:13
#3
digitalshadow avatar

digitalshadow

Totally Zenned

Join Date:
Mar 2009
Posts:
616
Plugin Contributions:
0

Re: function.preg-match error with additional_images.php

Would an image with a ( in the file name cause that error?
23 Dec 2010, 21:27
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: function.preg-match error with additional_images.php

It's more likely that you've got excessive "." symbols in the name, perhaps in a foldername of the path to the file.
23 Dec 2010, 22:35
#5
digitalshadow avatar

digitalshadow

Totally Zenned

Join Date:
Mar 2009
Posts:
616
Plugin Contributions:
0

Re: function.preg-match error with additional_images.php

the folder names are letters

the files have some

-

in them
26 Jan 2011, 21:27
#6
nagelkruid avatar

nagelkruid

Zen Follower

Join Date:
Nov 2006
Posts:
284
Plugin Contributions:
0

Re: function.preg-match error with additional_images.php

DigitalShadow:

Would an image with a ( in the file name cause that error?

I had the exact same error referring to the preg-match in additional_images.php, after searching the apache logs at that time i found there is a product with an image named: sigi_paraplu)rocky.jpg
eliminating the ) from the filename solves the error