Forums / Bug Reports / Multiple myDEBUG files, similar errors

Multiple myDEBUG files, similar errors

Views: 2,848

Results 21 to 27 of 27
10 Aug 2014, 6:25 PM
#21
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Multiple myDEBUG files, similar errors

RixStix:

It's probably a safe assumption that the languages_header.php in the same template needs a similar edit?
It's certainly worth a look!

10 Aug 2014, 6:35 PM
#22
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Multiple myDEBUG files, similar errors

Spoke too soon. Same error, moved down to line 31

[10-Aug-2014 11:26:05 America/Los_Angeles] #1  trim() called at [/home/XXXXXXXX/public_html/includes/functions/functions_general.php:65]
#2  zen_parse_input_field_data() called at [/home/XXXXXXXX/public_html/includes/functions/functions_general.php:79]
#3  zen_output_string() called at [/home/XXXXXXXX/public_html/includes/functions/html_output.php:466]
#4  zen_draw_hidden_field() called at [/home/XXXXXXXX/public_html/includes/modules/sideboxes/currencies_header.php:31]
#5  require(/home/XXXXXXXX/public_html/includes/modules/sideboxes/currencies_header.php) called at [/home/XXXXXXXX/public_html/includes/templates/westminster_new/common/tpl_header.php:85]
#6  require(/home/XXXXXXXX/public_html/includes/templates/westminster_new/common/tpl_header.php) called at [/home/XXXXXXXX/public_html/includes/templates/westminster_new/common/tpl_main_page.php:182]
#7  require(/home/XXXXXXXX/public_html/includes/templates/westminster_new/common/tpl_main_page.php) called at [/home/XXXXXXXX/public_html/index.php:97]

[10-Aug-2014 11:26:05 America/Los_Angeles] PHP Warning:  trim() expects parameter 1 to be string, array given in /home/XXXXXXXX/public_html/includes/functions/functions_general.php on line 65

Scan is still going but that one has already shown up. Between these and 6 PP logs for every order, the folder is growing quickly.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

10 Aug 2014, 7:18 PM
#23
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: Multiple myDEBUG files, similar errors

My bad; I should have paid more attention to the warning message itself. Here's a modified version, using the processing within the zen_get_all_get_params function as a guide:

<?php
/** Academe Template - currencies_header.php
 *
 * @copyright Copyright 2007 iChoze Internet Solutions http://ichoze.com
 * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: currencies.php 2834 2006-01-11 22:16:37Z birdbrain $
 */

$cur_header_status = $db->Execute("select layout_box_name from " . TABLE_LAYOUT_BOXES . " where (layout_box_status=1 or layout_box_status_single=1) and layout_template ='" . $template_dir . "' and layout_box_name='currencies_header.php'");

  if ($cur_header_status->RecordCount() != 0) {
    $show_currencies_header= true;
  }

  if ($show_currencies_header == true) {
    if (isset($currencies) && is_object($currencies)) {

      reset($currencies->currencies);
      $currencies_array = array();
      while (list($key, $value) = each($currencies->currencies)) {
        $currencies_array[] = array('id' => $key, 'text' => $value['title']);
      }

      $hidden_get_variables = '';
    if (is_array ($_GET)) {
      reset($_GET);
      while (list($key, $value) = each($_GET)) {
        if ( is_string ($value) && ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {
          $hidden_get_variables .= zen_draw_hidden_field($key, $value);
        }
      }
    }

      require($template->get_template_dir('tpl_currencies_header.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_currencies_header.php');
      $title =  BOX_HEADING_CURRENCIES;
      $title_link = false;
      $text = 'Currencies:';
      require($template->get_template_dir('tpl_box_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_box_header.php');
    }
  }
?>
10 Aug 2014, 7:55 PM
#24
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Multiple myDEBUG files, similar errors

Looks like that took care of the last errorlog file related to general_functions.php

Maybe I should undo RodG's edit to see what happens.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

11 Aug 2014, 12:16 PM
#25
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Multiple myDEBUG files, similar errors

RixStix:

TNX Lat9

change made, scan scheduled & should complete within an hour.
That's the only way I know of testing since no customer visit in the last week caused the error to be generated. The PCI scanner must be doing something special.

If RodG edit took care of 6 logfiles and this takes care of the last logfile, that will be 7 down, 3 to go.

That is something that I would never have been able to do on my own.

If this is not the proper category to bring this up, I would appreciate a pointer so that I can create the thread in the proper category.

It's probably a safe assumption that the languages_header.php in the same template needs a similar edit?

If these issues are appearing in default/a vanilla install of ZC 1.5.3, then perhaps an applicable location would be: http://www.zen-cart.com/showthread.php?213868-Known-Bugs-%28and-fixes%29-with-v1-5-3

But I see that from above about the statement of being template related may indicate that the template area may be a good place to post a link back to this thread. Particularly if the template is one available from this site. If not then notifying the author at least would help them and others that use/plan to use it.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

11 Aug 2014, 1:57 PM
#26
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Multiple myDEBUG files, similar errors

mc12345678:

But I see that from above about the statement of being template related may indicate that the template area may be a good place to post a link back to this thread. Particularly if the template is one available from this site. If not then notifying the author at least would help them and others that use/plan to use it.

True, now that more facts related to the issue are known.

Just to record the last change made, I removed RodG's edit so that only Lat9 edit is in place. The 7 debug files are no longer generated. I'm not saying there is no merit to RodG's edit but in this specific case, it did not was not a resolution to the issue.

Bugs are Bugs. I didn't see these deBUG files as bugs specifically related to the upgrade process but a potential bug to the core; thus my logic for posting here instead of upgrade bugs. The credit_cards.php deBug files still exist as do PayPal deBug files which are posted in the proper category.

Thank you Lat9 :smile:

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

21 Aug 2014, 7:22 AM
#27
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Multiple myDEBUG files, similar errors

Yes, thank you lat9 & RixStix.

I just thought I would add that I had exactly the same issue but with v1.51 and triggered by the dynamic filter mod. Using the same template as RixStix, the currencies_header.php edit resolved it.

Simon