Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

please help I have an error that may be simple to


Guest

Recommended Posts

Posted

Will somebody please help me.

 

I am getting this error while trying to use the print order popup on the confirmation page. It keeps stating this over and over again.

 

It may be simple to you to figure this one out but I am new.

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /catalog/includes/functions/general.php on line 42

 

Heres the section from my general.php

starting with line 34 and ending with 50

 

 

////

// Parse the data used in the html tags to ensure the tags will not break

function tep_parse_input_field_data($data, $parse) {

return strtr(trim($data), $parse);

}

 

function tep_output_string($string, $translate = false, $protected = false) {

if ($protected == true) {

/* Ln 42 is here -->*/ return htmlspecialchars($string);

} else {

if ($translate == false) {

return tep_parse_input_field_data($string, array('"' => '"'));

} else {

return tep_parse_input_field_data($string, $translate);

}

}

}

Posted

Is this a new installation? The code you posted looks fine. Check chmod is set at 644 - is this errors you are getting is at the Admin Control? Please print screen and share it or discribe proper location.

 

////

// Parse the data used in the html tags to ensure the tags will not break

  function tep_parse_input_field_data($data, $parse) {

    return strtr(trim($data), $parse);

  }

 

  function tep_output_string($string, $translate = false, $protected = false) {

    if ($protected == true) {

      return htmlspecialchars($string);

    } else {

      if ($translate == false) {

        return tep_parse_input_field_data($string, array('"' => '"'));

      } else {

        return tep_parse_input_field_data($string, $translate);

      }

    }

  }

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...