Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning Message when checking History Orders


rodcar

Recommended Posts

Hi everybody,

 

This message appears when you go into your account tab and click view for your history of orders. It shows up in the delivery and billing address;

 

 

 

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

 

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

 

This is a copy of the codes;

 

 

/*

$Id: general.js,v 1.3 2003/02/10 22:30:55 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

function SetFocus(TargetFormName) {

var target = 0;

if (TargetFormName != "") {

for (i=0; i<document.forms.length; i++) {

if (document.forms.name == TargetFormName) {

target = i;

break;

}

}

}

 

var TargetForm = document.forms[target];

 

for (i=0; i<TargetForm.length; i++) {

if ( (TargetForm.elements.type != "image") && (TargetForm.elements.type != "hidden") && (TargetForm.elements.type != "reset") && (TargetForm.elements.type != "submit") ) {

TargetForm.elements.focus();

 

if ( (TargetForm.elements.type == "text") || (TargetForm.elements.type == "password") ) {

TargetForm.elements.select();

}

 

break;

}

}

}

 

function RemoveFormatString(TargetElement, FormatString) {

if (TargetElement.value == FormatString) {

TargetElement.value = "";

}

 

TargetElement.select();

}

 

function CheckDateRange(from, to) {

if (Date.parse(from.value) <= Date.parse(to.value)) {

return true;

} else {

return false;

}

}

 

function IsValidDate(DateToCheck, FormatString) {

var strDateToCheck;

var strDateToCheckArray;

var strFormatArray;

var strFormatString;

var strDay;

var strMonth;

var strYear;

var intday;

var intMonth;

var intYear;

var intDateSeparatorIdx = -1;

var intFormatSeparatorIdx = -1;

var strSeparatorArray = new Array("-"," ","/",".");

var strMonthArray = new Array("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");

var intDaysArray = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);

 

strDateToCheck = DateToCheck.toLowerCase();

strFormatString = FormatString.toLowerCase();

 

if (strDateToCheck.length != strFormatString.length) {

return false;

}

 

for (i=0; i<strSeparatorArray.length; i++) {

if (strFormatString.indexOf(strSeparatorArray) != -1) {

intFormatSeparatorIdx = i;

break;

}

}

 

for (i=0; i<strSeparatorArray.length; i++) {

if (strDateToCheck.indexOf(strSeparatorArray) != -1) {

intDateSeparatorIdx = i;

break;

}

}

 

if (intDateSeparatorIdx != intFormatSeparatorIdx) {

return false;

}

 

if (intDateSeparatorIdx != -1) {

strFormatArray = strFormatString.split(strSeparatorArray[intFormatSeparatorIdx]);

if (strFormatArray.length != 3) {

return false;

}

 

strDateToCheckArray = strDateToCheck.split(strSeparatorArray[intDateSeparatorIdx]);

if (strDateToCheckArray.length != 3) {

return false;

}

 

for (i=0; i<strFormatArray.length; i++) {

if (strFormatArray == 'mm' || strFormatArray == 'mmm') {

strMonth = strDateToCheckArray;

}

 

if (strFormatArray == 'dd') {

strDay = strDateToCheckArray;

}

 

if (strFormatArray == 'yyyy') {

strYear = strDateToCheckArray;

}

}

} else {

if (FormatString.length > 7) {

if (strFormatString.indexOf('mmm') == -1) {

strMonth = strDateToCheck.substring(strFormatString.indexOf('mm'), 2);

} else {

strMonth = strDateToCheck.substring(strFormatString.indexOf('mmm'), 3);

}

 

strDay = strDateToCheck.substring(strFormatString.indexOf('dd'), 2);

strYear = strDateToCheck.substring(strFormatString.indexOf('yyyy'), 2);

} else {

return false;

}

}

 

if (strYear.length != 4) {

return false;

}

 

intday = parseInt(strDay, 10);

if (isNaN(intday)) {

return false;

}

if (intday < 1) {

return false;

}

 

intMonth = parseInt(strMonth, 10);

if (isNaN(intMonth)) {

for (i=0; i<strMonthArray.length; i++) {

if (strMonth == strMonthArray) {

intMonth = i+1;

break;

}

}

if (isNaN(intMonth)) {

return false;

}

}

if (intMonth > 12 || intMonth < 1) {

return false;

}

 

intYear = parseInt(strYear, 10);

if (isNaN(intYear)) {

return false;

}

if (IsLeapYear(intYear) == true) {

intDaysArray[1] = 29;

}

 

if (intday > intDaysArray[intMonth - 1]) {

return false;

}

 

return true;

}

 

function IsLeapYear(intYear) {

if (intYear % 100 == 0) {

if (intYear % 400 == 0) {

return true;

}

} else {

if ((intYear % 4) == 0) {

return true;

}

}

 

return false;

}

 

Anybody

Link to comment
Share on other sites

Try google with this

 

site:www.oscommerce.com/forums htmlspecialchars() expects parameter 1 to be string, array given in includes/functions/general.php on line 42

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...