Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

PHP Warning: htmlspecialchars()


Recommended Posts

opencart 1551 и вот такая проблема
 

2015-03-17 7:17:09 - PHP Warning:  htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspecialchars</a>]: Invalid multibyte sequence in argument in ............/public_html/system/library/request.php on line 33
 
проблема я так понял и кодировкой

прошу помощи, кто сможет помочь? конечно оплату гарантирую

Спасибо
 
Link to post
Share on other sites

Строку 33 покажите

Link to post
Share on other sites

<?php

class Request {

public $get = array();

public $post = array();

public $cookie = array();

public $files = array();

public $server = array();

 

  public function __construct() {

$_GET = $this->clean($_GET);

$_POST = $this->clean($_POST);

$_REQUEST = $this->clean($_REQUEST);

$_COOKIE = $this->clean($_COOKIE);

$_FILES = $this->clean($_FILES);

$_SERVER = $this->clean($_SERVER);

 

$this->get = $_GET;

$this->post = $_POST;

$this->request = $_REQUEST;

$this->cookie = $_COOKIE;

$this->files = $_FILES;

$this->server = $_SERVER;

}

 

  public function clean($data) {

    if (is_array($data)) {

  foreach ($data as $key => $value) {

unset($data[$key]);

 

    $data[$this->clean($key)] = $this->clean($value);

  }

} else { 

  $data = htmlspecialchars($data, ENT_COMPAT, 'UTF-8'); (33 строка)

}

 

return $data;

}

}

?>

Link to post
Share on other sites

Строка 33 стандартная, см. тут

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.