Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | all |
Consider this example:
use Symfony\Component\HttpFoundation\AcceptHeader;
$acceptHeader = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
$quality = AcceptHeader::fromString($acceptHeader)
->get('text/xml')
->getQuality();
I thought this code was going to return 0.8
, because text/xml
falls into */*
category ... but instead I see this error message:
Call to a member function getQuality() on null
Is this a Symfony bug or is this strange behavior really expected?