Closed danielmreck closed 6 years ago
Ooof, nice catch. I didn’t consider double &. Should be a simple change. I’ll whip up a PR when I’ve got a free moment.
This issue has been automatically marked as stale because it has not had activity in 14 days. It will be closed in 2 days if no further activity occurs. Thank you for your contributions.
Down stalebot.
Hello,
When certain unusual URI queries are passed to phpSmug, we sometimes receive the following error:
This is caused when contiguous '&' characters appear in the query statement, effectively creating empty arguments, as seen here between arg1 and arg2:
The PHP notice can be corrected by stripping out these empty arguments, by inserting the following at line 137 in phpsmug/lib/phpSmug/Client.php, just before the
foreach
loop:$pairs = array_diff($pairs,['']);
Here is the context:
I'm sorry I can't formally fork and unit test this right now, although this fix is working in my project.