{"action":"created","issue":{"url":"https://api.github.com/repos/willdurand/Negotiation/issues/81","repository_url":"https://api.github.com/repos/willdurand/Negotiation","labels_url":"https://api.github.com/repos/willdurand/Negotiation/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/willdurand/Negotiation/issues/81/comments","events_url":"https://api.github.com/repos/willdurand/Negotiation/issues/81/events","html_url":"https://github.com/willdurand/Negotiation/issues/81","id":172640437,"number":81,"title":"E_WARNING: array_map(): An error occurred while invoking the map callback","user":{"login":"sgehrig","id":43394,"avatar_url":"https://avatars.githubusercontent.com/u/43394?v=3","gravatar_id":"","url":"https://api.github.com/users/sgehrig","html_url":"https://github.com/sgehrig","followers_url":"https://api.github.com/users/sgehrig/followers","following_url":"https://api.github.com/users/sgehrig/following{/other_user}","gists_url":"https://api.github.com/users/sgehrig/gists{/gist_id}","starred_url":"https://api.github.com/users/sgehrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgehrig/subscriptions","organizations_url":"https://api.github.com/users/sgehrig/orgs","repos_url":"https://api.github.com/users/sgehrig/repos","events_url":"https://api.github.com/users/sgehrig/events{/privacy}","received_events_url":"https://api.github.com/users/sgehrig/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/willdurand/Negotiation/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-08-23T08:28:59Z","updated_at":"2016-08-24T08:34:24Z","closed_at":null,"body":"After deploying the negotiation library as part of [FriendsOfSymfony/FOSRestBundle](https://github.com/FriendsOfSymfony/FOSRestBundle) version 2.0.0 we started to get \r\n\r\n> **E_WARNING:** array_map(): An error occurred while invoking the map callback\r\n\r\nfrom `Negotiation\\AbstractNegotiator::getBest()` (27 or 28). I assume this happens because `Negotiation\\Accept::__construct()` may throw an exception when constructed with an invalid value. This in turn seems to trigger [PHP bug #55416](https://bugs.php.net/bug.php?id=55416) causing a warning to be emitted. \r\n\r\nI don't know which exact value seems to cause this problem as the issue is not reproducible and only happens sparsely on our live servers - most often with some Android phones. \r\n\r\nCan this part be rewritten somehow to circumvent PHP bug #55416? Or can the logic be implemented a little bit more tolerant to weird values coming in from web clients? "},"comment":{"url":"https://api.github.com/repos/willdurand/Negotiation/issues/comments/241994564","html_url":"https://github.com/willdurand/Negotiation/issues/81#issuecomment-241994564","issue_url":"https://api.github.com/repos/willdurand/Negotiation/issues/81","id":241994564,"user":{"login":"sgehrig","id":43394,"avatar_url":"https://avatars.githubusercontent.com/u/43394?v=3","gravatar_id":"","url":"https://api.github.com/users/sgehrig","html_url":"https://github.com/sgehrig","followers_url":"https://api.github.com/users/sgehrig/followers","following_url":"https://api.github.com/users/sgehrig/following{/other_user}","gists_url":"https://api.github.com/users/sgehrig/gists{/gist_id}","starred_url":"https://api.github.com/users/sgehrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgehrig/subscriptions","organizations_url":"https://api.github.com/users/sgehrig/orgs","repos_url":"https://api.github.com/users/sgehrig/repos","events_url":"https://api.github.com/users/sgehrig/events{/privacy}","received_events_url":"https://api.github.com/users/sgehrig/received_events","type":"User","site_admin":false},"created_at":"2016-08-24T08:34:24Z","updated_at":"2016-08-24T08:34:24Z","body":"But I think, changing this will lead to a BC break - but at least it'll resolve the main issue very quickly ;-) "}}
{"actor":{"display_login":"sgehrig"}}