Hi,
I've installed a custom template which is using some sort of override setting to force automatic buttons instead of static image buttons. i want to use static image buttons.
In order to do so i had to remove or replace the following 2 functions: az_tep_image and az_tep_image_submit from /includes/templates/ZC…../common/tpl_main_page.php. since i've done that, i get the following error on my front page:
Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 0 in /home/fhlinux144/e/efs-pro.fr/user/htdocs/includes/classes/template_func.php on line 60
Apparently this concerns [function.preg-match]?
I checked my server info and PCRE (Perl Compatible Regular Expressions) Support has been enabled.
I then started looking through the forum i found the following Thread:
http://www.zen-cart.com/forum/showthread.php?t=46691
Here i found a solution, but i'm a bit worried about the solution that i have found!!
I replaced the following code inside: includes/classes/template_func.php
lines 57-60 1.3.5 version:
$file_pattern = '/'.$file_pattern.'$/';
if ($mydir = @dir($file_dir)) {
while ($file = $mydir->read()) {
if (preg_match($file_pattern, $file))
to
lines 57-60 1.3.0 version:
if ($mydir = @dir($file_dir)) {
while ($file = $mydir->read()) {
if ( strstr($file, $file_pattern) ) {
Why i'm i worried? Well i'm using an older version, will this effect other parts of my shop, do i need to use another solution?
Could someone please give me their opinion?
cheers
baz°
Bookmarks