Fix some PHP8 depreciation
This commit is contained in:
parent
8a10dcfab3
commit
afedc83193
5 changed files with 45 additions and 40 deletions
|
|
@ -249,8 +249,8 @@ class Facture
|
|||
$data = compact('type', 't', 'year', 'y', 'ynumber', 'id');
|
||||
|
||||
return preg_replace_callback('/%(\d+)?\{([a-z]+)\}/', function ($match) use ($data) {
|
||||
$v = $data[$match[2]];
|
||||
$type = ctype_digit($data[$match[2]]) ? 'd' : 's';
|
||||
$v = (string) $data[$match[2]];
|
||||
$type = ctype_digit($v) ? 'd' : 's';
|
||||
return sprintf('%' . $match[1] . $type, $v);
|
||||
}, $pattern);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue