Doc #52855 [NEW]: Incorrect example provided for geoip-db-avail

From: Date: Wed, 15 Sep 2010 13:33:45 +0000
Subject: Doc #52855 [NEW]: Incorrect example provided for geoip-db-avail
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5053@lists.php.net to get a copy of this message
From: Operating system: PHP version: 5.3.3 Package: Documentation problem Bug Type: Documentation Problem Bug description:Incorrect example provided for geoip-db-avail Description: ------------ The example provided on the following page is incorrect: http://www.php.net/manual/en/function.geoip-db-avail.php Example #1 A geoip_db_avail() example This will output the current database version string. <?php if (geoip_db_avail(GEOIP_COUNTRY_EDITION)) print geoip_database_info(GEOIP_COUNTRY_EDITION); ?> The above example will output: GEO-106FREE 20080801 Build 1 Copyright (c) 2006 MaxMind LLC All Rights Reserved The incorrect function (geoip_database_info rather than geoip_db_avail)is being used in the print statement which means the output displayed is incorrect for the function being described. It should be a bool. Expected result: ---------------- Example #1 A geoip_db_avail() example This will output the current database version string. <?php if (geoip_db_avail(GEOIP_COUNTRY_EDITION)) print geoip_db_avail(GEOIP_COUNTRY_EDITION); ?> The above example will output: True -- Edit bug report at http://bugs.php.net/bug.php?id=52855&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52855&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52855&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52855&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52855&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52855&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52855&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52855&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52855&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52855&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52855&r=support Expected behavior: http://bugs.php.net/fix.php?id=52855&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52855&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52855&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52855&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52855&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52855&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52855&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52855&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52855&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52855&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52855&r=mysqlcfg

« previous php.doc.bugs (#5053) next »