Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2015
    Location
    Potters Bar, United Kingdom
    Posts
    10
    Plugin Contributions
    0

    Idea or Suggestion 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.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default 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:
    Code:
    str_repeat(substr(PRODUCT_ALL_LIST_IMAGE, 3, 1), 1)
    Last edited by mc12345678; 30 Jul 2015 at 01:37 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 9
    Last Post: 11 Dec 2015, 11:35 PM
  2. v154 PHP Warning: require_once(configuration_default.php) ...No such file or directory
    By Awalji in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 24 Jun 2015, 03:16 PM
  3. Replies: 1
    Last Post: 30 Sep 2013, 07:39 PM
  4. Replies: 8
    Last Post: 19 Sep 2012, 03:37 AM
  5. PHP Warning: str_repeat() expects exactly 2 parameters,
    By lala rock in forum General Questions
    Replies: 4
    Last Post: 28 Feb 2012, 02:44 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