Posted by DanZ on December 5, 2012 at 2:08am
3 followers
| Project: | Ubercart |
| Version: | 7.x-3.x-dev |
| Component: | Orders |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Go to admin/store/orders/create
Type in a user name to search for.
Click Search.
Get an AJAX crash.
Comments
#1
Fix attached. I guess my version of PHP insists on an lvalue in a reset().
#2
The last submitted patch, uc_order_create_form-1858690-1.patch, failed testing.
#3
Hmm. I guess the automated tests really want a default value. Let's try this.
#4
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.
#5
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.
#6
We don't need the reset(), just key() will do. Committed, thanks for spotting this.
#7
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.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.