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.
Trying this module out and used a list of symbols with a comma delimiter (whoops). This caused the function stockapi_load in the stockapi to go into an infinite loop. In the stockapi_load function I modified this line
$stock = stockapi_load($symbol);
to
$stock = stockapi_load($stock[0]);
but perhaps the stock.module needs to clean the symbols or modified to use different delimiters? Thanks.
Comments
Comment #1
oadaeh CreditAttribution: oadaeh commentedYour suggestion didn't work for me. I'm sure there's a "correct" way to do this, but a quick and easy fix would be to just give the field a description which specifies to use spaces. The patch I have posted does just that (plus removes some trailing white space).
I am going to be doing some tweaking for my own benefit in this module. If I find a real fix for this problem, I'll post that patch also.
Comment #2
kbahey CreditAttribution: kbahey commentedCommited instruction enhancement to HEAD and 4.7.
Leaving issue open for tracking and patches from someone else.
Comment #3
agentrickardI had the same problem and added this line.
function stock_do_quote
Added as line 238 of stock.module (Using 5.x.1-dev).
There may need to be some regex checking against the user-inserted strings.
That might happen within stockapi_load(), as there it would be a universal fix.
Comment #4
yhager CreditAttribution: yhager commentedI was getting the same issue.
Users will not always do as they are requested and might add commas although they are told to use spaces.
The attached patch works for me.
Comment #5
kbahey CreditAttribution: kbahey commentedCommitted. Thanks.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.