Results 1 to 4 of 4

Warning: htmlspecialchars() error

This is a discussion on Warning: htmlspecialchars() error within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Code: Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/domains/wargamestore.com/user/htdocs/includes/functions/general.php on line 42 Line 42 says: Code: ...

      
  1. #1
    Member
    Join Date
    Sep 2003
    Posts
    90
    Rep Power
    0


    Default Warning: htmlspecialchars() error

    Code:
    Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/domains/wargamestore.com/user/htdocs/includes/functions/general.php on line 42
    Line 42 says:
    Code:
    return htmlspecialchars ($string)
    I replaced with
    Code:
    echo($string)
    to see what was being returned and it displays:
    Code:
    firstnamelastnameline1ofaddressline2ofaddresscityofcustomerpostcodeArray
    
    ,
    Don't know what Array is at the end of this string? Firstname, lastname etc are the details I created the test account with but the Array then all the spaces and the , really has me beat.
    I searched and found a similar problem to do with country processing and I notice I do not show country anywhere on my site after the account is created.
    Any ideas?

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Default

    It would help if you gave us some background on the mod you did to create the error. Thanks!
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    Member
    Join Date
    Sep 2003
    Posts
    90
    Rep Power
    0


    Default

    I had installed:
    http://forums.oscommerce.com/index.p...=64545&hl=
    but was unable to get it working, so I replaced the modded files with my backup versions.

    I won't mention the name here but after wrestling with this for 2 days I decided to try a certain well known brand of file comparison software. I ran it against a backup from about 7 days ago. Problem solved! I don't know how it happened but there was a difference in general.php line 265 which should have been:
    Code:
    return $country_array['countries_name'];
    but which in my later file was:
    Code:
    return $country_array['my_country'];
    I've checked through the code for the above mod and can find nothing that suggests this change so I cannot figure how I came to do this, but I must have. I won't ever be without file comparison software again.

  4. #4
    New Member
    Join Date
    Apr 2003
    Posts
    12
    Rep Power
    0


    Default

    I have this same error, is there a fix for it yet?

Similar Threads

  1. htmlspecialchars() -error in fresh install
    By mazhar in forum osCmax v2 Installation issues
    Replies: 10
    Last Post: 08-13-2006, 09:27 AM
  2. BTS 1.2/Max1.5.5 warning & fatal error
    By jptechnical in forum osCMax v1.7 General Mods Discussion
    Replies: 12
    Last Post: 01-15-2005, 09:47 AM
  3. Error Message Help, Warning: session_start ?????
    By emerge23 in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 11-16-2004, 11:43 AM
  4. Installation problems (fatal error and warning)
    By Martin_J in forum osCommerce 2.2 Installation Help
    Replies: 1
    Last Post: 02-04-2004, 06:27 AM
  5. Help about warning
    By Anonymous in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 11-09-2002, 01:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •