[ic] Bugfix for Cart.pm, MaxQuantityField prefix

Josh Lavin josh at perusion.net
Tue May 3 14:16:24 UTC 2011


On 05/02/2011 04:42 PM, Jon Jensen wrote:
> On Mon, 2 May 2011, Josh Lavin wrote:
>
>> The patch is simple (the problem is the substitution caused prefix to
>> be set to a '1', not the actual prefix):
>>
[snip]
>
> That use of a regular expression match is not safe. The $1 will contain
> the last successful match, even if the previous match failed, so you
> always have to check for success of the regex match immediately
> beforehand.

Ah... makes sense. Thanks, Jon.

Here is an updated commit:

https://github.com/jlavin/interchange/commit/99755ab2797697c5dae20d94389f25d23e8473b1

-- 
Josh Lavin
Perusion -- Expert Interchange Consulting    http://www.perusion.com/



More information about the interchange-users mailing list