The deprecated method escapeunderscore() of database handlers has been

removed. You must use escapeforlike instead.
This commit is contained in:
Laurent Destailleur 2022-12-17 13:06:22 +01:00
parent b4076612e5
commit 24fcb2ff16
7 changed files with 3 additions and 61 deletions

View File

@ -796,7 +796,7 @@ class BlockedLog
{ {
try { try {
//include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; //include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$aaa = unserialize($data); $aaa = jsonOrUnserialize($data);
} catch (Exception $e) { } catch (Exception $e) {
//print $e->getErrs); //print $e->getErrs);
} }

View File

@ -173,20 +173,11 @@ interface Database
/** /**
* Escape a string to insert data * Escape a string to insert data
* *
* @param string $stringtoencode String to escape * @param string $stringtoencode String to escape
* @return string String escaped * @return string String escaped
*/ */
public function escape($stringtoencode); public function escape($stringtoencode);
/**
* Escape a string to insert data
*
* @param string $stringtoencode String to escape
* @return string String escaped
* @deprecated
*/
public function escapeunderscore($stringtoencode);
/** /**
* Escape a string to insert data into a like * Escape a string to insert data into a like
* *

View File

@ -474,18 +474,6 @@ class DoliDBMysqli extends DoliDB
return $this->db->real_escape_string((string) $stringtoencode); return $this->db->real_escape_string((string) $stringtoencode);
} }
/**
* Escape a string to insert data
*
* @param string $stringtoencode String to escape
* @return string String escaped
* @deprecated
*/
public function escapeunderscore($stringtoencode)
{
return str_replace('_', '\_', (string) $stringtoencode);
}
/** /**
* Escape a string to insert data into a like * Escape a string to insert data into a like
* *

View File

@ -721,18 +721,6 @@ class DoliDBPgsql extends DoliDB
return pg_escape_string($stringtoencode); return pg_escape_string($stringtoencode);
} }
/**
* Escape a string to insert data
*
* @param string $stringtoencode String to escape
* @return string String escaped
* @deprecated
*/
public function escapeunderscore($stringtoencode)
{
return str_replace('_', '\_', (string) $stringtoencode);
}
/** /**
* Escape a string to insert data into a like * Escape a string to insert data into a like
* *

View File

@ -649,18 +649,6 @@ class DoliDBSqlite3 extends DoliDB
return Sqlite3::escapeString($stringtoencode); return Sqlite3::escapeString($stringtoencode);
} }
/**
* Escape a string to insert data
*
* @param string $stringtoencode String to escape
* @return string String escaped
* @deprecated
*/
public function escapeunderscore($stringtoencode)
{
return str_replace('_', '\_', (string) $stringtoencode);
}
/** /**
* Escape a string to insert data into a like * Escape a string to insert data into a like
* *

View File

@ -11428,7 +11428,6 @@ function jsonOrUnserialize($stringtodecode)
} }
/** /**
* Return if a $sqlfilters parameter is valid and will pass the preg_replace_callback() to replace Generic filter string with SQL filter string * Return if a $sqlfilters parameter is valid and will pass the preg_replace_callback() to replace Generic filter string with SQL filter string
* Example of usage: * Example of usage:

View File

@ -251,18 +251,6 @@ class TraceableDB extends DoliDB
return $this->db->escape($stringtoencode); return $this->db->escape($stringtoencode);
} }
/**
* Escape a string to insert data
*
* @param string $stringtoencode String to escape
* @return string String escaped
* @deprecated
*/
public function escapeunderscore($stringtoencode)
{
return $this->db->escapeunderscore($stringtoencode);
}
/** /**
* Escape a string to insert data into a like * Escape a string to insert data into a like
* *