mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +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