mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Skip filter_var on 5.3.2 since it is buggy
This commit is contained in:
parent
ed8aa8322a
commit
8ff497ac6f
3 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,7 @@ class InitCommand extends Command
|
|||
public function parseAuthorString($author)
|
||||
{
|
||||
if (preg_match('/^(?P<name>[- \.,\w\'’]+) <(?P<email>.+?)>$/u', $author, $match)) {
|
||||
if (!function_exists('filter_var') || $match['email'] === filter_var($match['email'], FILTER_VALIDATE_EMAIL)) {
|
||||
if (!function_exists('filter_var') || version_compare(PHP_VERSION, '5.3.3', '<') || $match['email'] === filter_var($match['email'], FILTER_VALIDATE_EMAIL)) {
|
||||
return array(
|
||||
'name' => trim($match['name']),
|
||||
'email' => $match['email']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue