Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Go to admin/store/orders/create
Type in a user name to search for.
Click Search.
Get an AJAX crash.
Comment | File | Size | Author |
---|---|---|---|
#1 | uc_order_create_form-1858690-1.patch | 571 bytes | DanZ |
#3 | attribute_option_form_validate-1854692-3.patch | 790 bytes | DanZ |
Comments
Comment #1
DanZ CreditAttribution: DanZ commentedFix attached. I guess my version of PHP insists on an lvalue in a reset().
Comment #3
DanZ CreditAttribution: DanZ commentedHmm. I guess the automated tests really want a default value. Let's try this.
Comment #4
longwaveTest 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.
Comment #5
DanZ CreditAttribution: DanZ commentedFYI, searching by first name, last name, or e-mail address does not trigger this crash for me. I'm running PHP 5.3.18.
Comment #6
longwaveWe don't need the reset(), just key() will do. Committed, thanks for spotting this.
Comment #7
DanZ CreditAttribution: DanZ commentedThe 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.