Leading 0 in uc_vat_number.js cause country codes to be interpreted in octal

wimh - July 30, 2009 - 14:18
Project:Ubercart VAT Number
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

The european_countries list in uc_vat_number.js has leading zeros for the entries 040 and 056 (Austria and Belgium), which causes them to be interpreted as octal numbers. Belgium and Austria are therefor not considered European countries, so no VAT number entry is possible. A patch to remove these zeros is attached.

AttachmentSize
uc_vat_number.js_.patch841 bytes

#1

wimh - August 3, 2009 - 09:20

The same problem is also in uc_vat_number.module:uc_vat_number_checkout_validate()

 
 

Drupal is a registered trademark of Dries Buytaert.