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.
ip_address() function can return more than one IP ;)
On my customer's page ip_address have even 3 standard IPs in one record (length 40 was ok in this case).
Not so far ago I had an issue when users_stats wanted to write 2 IPv6 addresses returned by ip_address() - lenght set to 40 was not enough.
I attached a patch which increment length to 128 - enough to storage 3 IPv6 in one record and cut $ip_address before INSERT if it's longer than 128 to avoid errors.
Comment | File | Size | Author |
---|---|---|---|
user_stats-d7-7104-2.patch | 1.9 KB | javjaff |
Comments