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.
1) Would be good to sort payment method options in payment_form_process_method().
2) Better to use natcasesort() in payment_method_options() as well.
3) fixed a typo
Comment | File | Size | Author |
---|---|---|---|
#6 | payment_method_options_netcasesort-6.patch | 411 bytes | a.milkovsky |
payment_method_options_netcasesort.patch | 968 bytes | a.milkovsky | |
Comments
Comment #1
XanoДуже дякую!
Comment #4
amandahart CreditAttribution: amandahart commentedI am running into an issue that I believe is related to this patch, so I wanted to bump this up to get some attention.
I've installed Payment 7.x-1.15 on a fresh Drupal 7.38 install to test for a possible client event registration/payment system, and am receiving this warning message when I view admin/content/payment:
Checking the code, it seems that line 1157 in the function payment_method_options() is using $pmid_options as a parameter, but that variable is completely uninitialized within the scope of the function. I suspect it is intended to be $options (or $options needs to be renamed to $pmid_options). I've pasted the current code below so you can see at a glance what I am referring to:
(This is my first post on the Drupal site, so please forgive any formatting errors... thank you!)
Comment #5
XanoComment #6
a.milkovskywhoops. please review
amandahart, thanks for reporting!
Comment #7
amandahart CreditAttribution: amandahart commentedI just ran the patch on my local machine and the warning has disappeared. The change looks correct to me. Thanks for fixing it! Looking forward to the next release.
Comment #8
a.milkovskyThanks, so changing the status. I would credit it to amandahart
Comment #9
Xano@amandahart: Welcome here, and thanks for reporting the problem and proposing the solution. I have credited you in the commit for your work. If you'd like to write patches yourself in the future, I can recommend these excellent handbook pages.
@a.milkovsky: thanks for the review, and giving credit!
Comment #12
guardian87 CreditAttribution: guardian87 commentedPatch worked perfectly here as well!