Skip to content

Zend\Http\Header\AbstractAccept, "undefined offset: 1" for some accept headers #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
weierophinney opened this issue Dec 31, 2019 · 1 comment

Comments

@weierophinney
Copy link
Member

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7352
User: @jurajseffer
Created On: 2015-03-21T13:59:27Z
Updated At: 2015-11-06T21:19:42Z
Body
ZF version tested on: 2.3.3

An application sometimes receives the following (invalid?) accept header:

Accept: text/html,application/xhtml+xml,application/xml;image/png,image/jpeg,image/*;q=0.9,*/*;q=0.8

This causes an "Undefined offset: 1" notice on line 174 in Zend\Http\Header\AbstractAccept

$value = trim($explode[1]);


Originally posted by @GeeH at zendframework/zend-http#73

@samsonasik
Copy link
Member

it seems already handled at

if (count($explode) === 2) {
with count explode variable check. I am closing it. Please re-create issue if the problem persist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants