Commit 6efda91
committed
Fix filter() to use keys and allow extension capabilities
The filter() method had three bugs:
1. array_filter callback received values instead of keys, causing
TypeError when capability values are arrays (e.g. goog:chromeOptions)
2. Extension capabilities (keys containing ':') were stripped, but
W3C spec requires them to be allowed through
3. array_values() destroyed the key-value mapping, turning
{"browserName": "chrome"} into ["chrome"]
Fix by using ARRAY_FILTER_USE_KEY, allowing extension capabilities
per W3C spec, and removing array_values() wrapper.
References:
- https://www.w3.org/TR/webdriver2/#dfn-extension-capability
- https://www.php.net/array_filter1 parent b440f54 commit 6efda91
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
0 commit comments