Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Urgent, Htmlspecialchars() Expects Parameter 1 To Be String


flofi

Recommended Posts

Hi everybody,

 

i have the following failure message using the contribution shop in cart v2.2.1.:

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

 

following operational sequence: put a product in cart, click on checkout, setup a new account. When finished, go to cart. Now i can see the failure:

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

 

What i can see is (not the exact translation, sorry):

 

Number of products : 1

deliver to :

 

Deliverycosts zones (not possible to deliver in this country)

 

nothing else to see.

 

Now I setup a new adress under my account, which is similar to the first adress. The new adress is set to standard. Now i go back to the cart, the failure message is alway still there, but now i have a dropdown with the two adresses. When I chose now one of the both adresses, everthing is display correctly without a failure.

 

The Block, within line 117 is not modified in general.php:

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);

}

}

}

 

I tried the following without success.

http://forums.oscommerce.de/index.php?showtopic=19562

 

the 81 for the country is inserted correctly. entry_state und entry_Suburb is NULL.

 

 

 

address_book_id - 40

customers_id - 33

entry_gender - leeres Feld (also keine 0 oder NULL)

entry_company - leeres Feld (also keine 0 oder NULL)

entry_firstname - Max

entry_lastname - Mustermann

entry_street_address - teststrasse 1

entry_suburb - NULL

entry_postcode - 12345

entry_city - Testhausen

entry_state - NULL

entry_country_id - 81 (wird also richtig eingetragen)

entry_zone_id - 0

entry_title_id - 1 (dieses Feld ist für ein Dropdown mit Herr, Frau, Firma)

 

Ich hab auch noch eine Tabelle zones_to_geozones:

association_id - 2

zone_country_id - 81

zone_id - NULL (in all other fields is a 0), changed it in this field also to 0, no success

geo_zone_id - 2

last_modified - 2007-03-20 09:37:18

date_added - 2007-03-11 18:56:52

 

dann gibt es noch die Tagelle geo_zones:

in this table is only a zone i inserted

geo_zone_id - 2

geo_zone_name - Steuer-Mwst

geo_zone_description - Für alle Kunden in Deutschland

last_modified - 2007-03-20 09:37:44

date_added - 2007-03-11 18:51:57

 

 

 

A user from the german oscommerce forum told me this:

File Manager Problem

http://www.oscommerce.com/community/bugs,1391

------------------------------------------------------------------------------

 

Problem:

 

Parsing errors occur when saving edited files through the File Manager.

 

Solution:

 

Line 148 in catalog/admin/file_manager.php must be changed from:

 

$file_contents = htmlspecialchars(implode('', $file_array));

 

to:

 

$file_contents = addslashes(implode('', $file_array));

 

Note: This update also requires the Contact Us Form XSS Issue update in order to function correctly.

 

 

 

no success

 

 

and this:

 

http://forums.oscommerce.de/index.php?show...tmlspecialchars

 

no success

 

in my version of oscommerce is already the following in the file_manager.php:

 

$file_contents = addslashes(implode('', $file_array));

 

changed it to:

 

$file_contents = addslashes(htmlspecialchars(implode('', $file_array)));

 

no success.

 

 

Hope somebody can help me

 

thanks

 

flo

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...