mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -726,10 +726,22 @@ class DoliDBPgsql extends DoliDB
|
||||
*
|
||||
* @param string $stringtoencode String to escape
|
||||
* @return string String escaped
|
||||
* @deprecated
|
||||
*/
|
||||
public function escapeunderscore($stringtoencode)
|
||||
{
|
||||
return str_replace('_', '\_', $stringtoencode);
|
||||
return str_replace('_', '\_', (string) $stringtoencode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape a string to insert data into a like
|
||||
*
|
||||
* @param string $stringtoencode String to escape
|
||||
* @return string String escaped
|
||||
*/
|
||||
public function escapeforlike($stringtoencode)
|
||||
{
|
||||
return str_replace(array('_', '\\', '%'), array('\_', '\\\\', '\%'), (string) $stringtoencode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user