Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Payment
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Sep 2014 at 18:00 UTC
Updated:
13 Jan 2016 at 03:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rszrama commentedIt sounds to me like you have some payment method module on your site that didn't define the required 'title' value in its info array. I'd start looking there. It's possible that something else has altered that value away, but that would be unusual.
Comment #2
decipheredI get this message, not because it hasn't defined the required 'title' value, but rather because the function
commerce_payment_method_get_title()is getting invoked a second time (for whatever reason) and the second time when it callscommerce_payment_methods()it receives the each payment methods title string instead of full array.This appears to be caused by the array returned from
commerce_payment_methods()being passed by reference, and therefore any changes made directly to it (as is exactly whatcommerce_payment_method_get_title()does) is stored statically and returned next time around.Simple fix, don't manipulate
$payment_methods, instead append the relevant values to another array to be returned from the function.Patch attached.
Comment #3
joelpittetThis patch seems very good because it avoids overwriting the existing array to build up the titles.
Comment #4
adamwhite commentedThis patch works for me.
I encountered this issue by having a rule that has two "Select payment method comparison" conditions in it separated by an OR (to check if the payment method was A or B). Once the second condition was added I started seeing the error.
Comment #5
joelpittetComment #6
rszrama commentedCommitted with a comment fix.
Comment #7
rszrama commentedDerp. Committed now.