Go to admin/store/orders/create
Type in a user name to search for.
Get an AJAX crash.
Fix attached. I guess my version of PHP insists on an lvalue in a reset().
The last submitted patch, uc_order_create_form-1858690-1.patch, failed testing.
Hmm. I guess the automated tests really want a default value. Let's try this.
Test failures in #1 are unrelated, looks like testbot ran out of disk space. But the default value ensures that the first radio button is preselected, which is a better user experience.
FYI, searching by first name, last name, or e-mail address does not trigger this crash for me. I'm running PHP 5.3.18.
We don't need the reset(), just key() will do. Committed, thanks for spotting this.
The reset is a safety mechanism in case future code does something with the $options array before that line. It guarantees that key() will point to the first element of the array.
It's not required for current code, though, yes.
Automatically closed -- issue fixed for 2 weeks with no activity.
This issue has no child issues.
Drupal is a registered trademark of Dries Buytaert.