Hi,
Good morning.
I’ve been getting a popup “undefined” error that only shows the very 1st time I go to my website. Debug error is as follows:
notice: Use of undefined constant geoplugin_latitude - assumed 'geoplugin_latitude' in /home/mysite/public_html/wp-content/plugins/geodir_location_manager/geodir_location_hooks_actions.php on line 2204Notice: Use of undefined constant geoplugin_longitude - assumed 'geoplugin_longitude' in /home/mysite/public_html/wp-content/plugins/geodir_location_manager/geodir_location_hooks_actions.php on line 2205http://mysite.com/location/united-states/texas/dallas
On lines 2203-22055 of geodir_location_hooks_actions.php I found this:
$addr_details = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$ip));
$mylat = stripslashes(ucfirst($addr_details[geoplugin_latitude]));
$mylon = stripslashes(ucfirst($addr_details[geoplugin_longitude]));
I went to geopluin.net and added my IP to the parameter, ip, and got the following response:
a:18:{s:17:"geoplugin_request";s:13:"208.54.86.248";s:16:"geoplugin_status";i:206;s:16:"geoplugin_credit";s:145:"Some of the returned data includes GeoLite data created by MaxMind, available from <a href='http://www.maxmind.com'>http://www.maxmind.com</a>.";s:14:"geoplugin_city";s:0:"";s:16:"geoplugin_region";s:0:"";s:18:"geoplugin_areaCode";s:1:"0";s:17:"geoplugin_dmaCode";s:1:"0";s:21:"geoplugin_countryCode";s:2:"US";s:21:"geoplugin_countryName";s:13:"United States";s:23:"geoplugin_continentCode";s:2:"NA";s:18:"geoplugin_latitude";s:2:"38";s:19:"geoplugin_longitude";s:3:"-97";s:20:"geoplugin_regionCode";s:0:"";s:20:"geoplugin_regionName";N;s:22:"geoplugin_currencyCode";s:3:"USD";s:24:"geoplugin_currencySymbol";s:5:"$";s:29:"geoplugin_currencySymbol_UTF8";s:1:"$";s:27:"geoplugin_currencyConverter";s:1:"1";}
Looks like geoplugin_latitude and geoplugin_longitude are both there in the response.
Any idea why I’m getting the error?
Thanks so much!