FIX list of module not complete when module mb_strlen not available
Conflicts: dev/dolibarr_changes.txt
This commit is contained in:
parent
4cbcf5189a
commit
61798d1af0
@ -111,3 +111,16 @@ to get
|
|||||||
if ($className == 'Luracast\Restler\mixed') return;
|
if ($className == 'Luracast\Restler\mixed') return;
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
|
PARSEDOWN
|
||||||
|
---------
|
||||||
|
|
||||||
|
* Fix to avoid fatal error when mb_strlen not available:
|
||||||
|
|
||||||
|
// @CHANGE LDR Fix when mb_strlen is not available
|
||||||
|
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
||||||
|
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
|
||||||
|
else $len = strlen($line);
|
||||||
|
$shortage = 4 - $len % 4;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -141,7 +141,11 @@ class Parsedown
|
|||||||
|
|
||||||
foreach ($parts as $part)
|
foreach ($parts as $part)
|
||||||
{
|
{
|
||||||
$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
// @CHANGE LDR Fix when mb_strlen is not available
|
||||||
|
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
||||||
|
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
|
||||||
|
else $len = strlen($line);
|
||||||
|
$shortage = 4 - $len % 4;
|
||||||
|
|
||||||
$line .= str_repeat(' ', $shortage);
|
$line .= str_repeat(' ', $shortage);
|
||||||
$line .= $part;
|
$line .= $part;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user