php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58232 Including 'country_name' in geoip_record_by_name
Submitted: 2008-06-12 11:07 UTC Modified: 2008-06-12 14:14 UTC
From: jason at omniti dot com Assigned: ohill (profile)
Status: Closed Package: geoip (PECL)
PHP Version: 5.2.5 OS: SunOS 5.10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jason at omniti dot com
New email:
PHP Version: OS:

 

 [2008-06-12 11:07 UTC] jason at omniti dot com
Description:
------------
It seems that geoip_record_by_name aims to be an all-encompassing function for as much City details as possible.

For some reason, our geoip_country_name_by_name was not working correctly, so I've patched our record_by_name function to include Country Name.

It might be helpful to include this in the array returned by geoip_record_by_name since it will make the function more complete, and doesn't incur any additional overhead since the lookup has already been performed at that point.


Reproduce code:
---------------
geoip.c:431
        add_assoc_string(return_value, "country_name", (gir->country_name == NULL) ? "" : gir->country_name, 1);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-12 13:12 UTC] ohill@php.net
It is fixed in CVS. Please tell me if it's working for you, I have also added country_code3.

Nice catch by the way.
 [2008-06-12 13:20 UTC] jason at omniti dot com
Works Perfectly. Thanks :)
 [2008-06-12 14:14 UTC] ohill@php.net
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/geoip


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 15:01:32 2024 UTC