mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-17 13:28:35 +01:00
coding conventions
This commit is contained in:
parent
567648710e
commit
57344ccb95
@ -60,15 +60,16 @@ class TracedStatement
|
|||||||
$this->exception = $e;
|
$this->exception = $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check parameters for illegal (non UTF-8) strings, like Binary data.
|
* Check parameters for illegal (non UTF-8) strings, like Binary data.
|
||||||
*
|
*
|
||||||
* @param $params
|
* @param $params
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function checkParameters($params){
|
public function checkParameters($params)
|
||||||
foreach($params as &$param){
|
{
|
||||||
if(!mb_check_encoding($param, 'UTF-8')){
|
foreach ($params as &$param) {
|
||||||
|
if(!mb_check_encoding($param, 'UTF-8')) {
|
||||||
$param = '[BINARY DATA]';
|
$param = '[BINARY DATA]';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -130,8 +131,8 @@ class TracedStatement
|
|||||||
*/
|
*/
|
||||||
public function getParameters()
|
public function getParameters()
|
||||||
{
|
{
|
||||||
$params = array();
|
$params = array();
|
||||||
foreach($this->parameters as $param){
|
foreach ($this->parameters as $param) {
|
||||||
$params[] = htmlentities($param, ENT_QUOTES, 'UTF-8', false);
|
$params[] = htmlentities($param, ENT_QUOTES, 'UTF-8', false);
|
||||||
}
|
}
|
||||||
return $params;
|
return $params;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user