forked from Wavyzz/dolibarr
Fix for utf-8 characters in the mask mercure
This commit is contained in:
@@ -814,7 +814,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
//print "masktri=".$masktri." maskcounter=".$maskcounter." maskraz=".$maskraz." maskoffset=".$maskoffset."<br>\n";
|
||||
|
||||
// Define $sqlstring
|
||||
$posnumstart=strrpos($maskwithnocode,$maskcounter); // Pos of counter in final string (from 0 to ...)
|
||||
$posnumstart=mb_strrpos($maskwithnocode,$maskcounter, 'UTF-8'); // Pos of counter in final string (from 0 to ...)
|
||||
if ($posnumstart < 0) return 'ErrorBadMaskFailedToLocatePosOfSequence';
|
||||
$sqlstring='SUBSTRING('.$field.', '.($posnumstart+1).', '.dol_strlen($maskcounter).')';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user