mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
Add preg_quote
This commit is contained in:
parent
62aaa65aa4
commit
d5411e3f08
@ -1064,7 +1064,7 @@ class Utils
|
||||
{
|
||||
$name = trim($name);
|
||||
$lastName = (strpos($name, ' ') === false) ? '' : preg_replace('#.*\s([\w-]*)$#', '$1', $name);
|
||||
$firstName = trim(preg_replace('#'.$lastName.'#', '', $name));
|
||||
$firstName = trim(preg_replace('#' . preg_quote($lastName, '/') . '#', '', $name));
|
||||
|
||||
return [$firstName, $lastName];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user