Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / PHP Warning - STR_REPEAT

PHP Warning - STR_REPEAT

Views: 536

Results 1 to 2 of 2
30 Jul 2015, 12:27 PM
#1
geobew avatar

geobew

New Zenner

Join Date:
Mar 2015
Location:
Potters Bar, United Kingdom
Posts:
10
Plugin Contributions:
0

PHP Warning - STR_REPEAT

Hi wondering if anyone can help,

ive come across a lot of errors in one of my PHP files.

I looked at the debug logs and it says this :

PHP Warning: str_repeat() expects exactly 2 parameters, 1 given in /var/www/includes/templates/##########_temp/templates/tpl_modules_products_all_listing.php on line 32

this is the line :

$display_products_image = '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $products_all->fields['products_image'], $products_all->fields['products_name'], IMAGE_PRODUCT_ALL_LISTING_WIDTH, IMAGE_PRODUCT_ALL_LISTING_HEIGHT) . '</a>' . str_repeat(substr(PRODUCT_ALL_LIST_IMAGE, 3, 1));

Any help is appreciated.

If i'm asking this in the wrong thread I apologize in advance.

30 Jul 2015, 12:32 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: PHP Warning - STR_REPEAT

Would seem that the proviided/used template was for an older version of ZC.

Compare that file to the default_template versiion of the same filename to see if the solution can be found, otherwise need to fullfill the php requirement for that function.

If desired to "reeat" the small amount of text one time, then modify to the below:

str_repeat(substr(PRODUCT_ALL_LIST_IMAGE, 3, 1), 1)