Notice: Undefined property: stdClass::$data in restrict_ip_boot()

Created on 23 August 2018, over 6 years ago
Updated 24 December 2024, 27 days ago

In hook_boot() in line number 230 and 238, the user object is supposed to have data index.
$country_code = $user->data['country_iso_code_2'];
But this 'country_iso_code_2' is set from some other module 'ip2country'. So, this module needs a dependency of 'ip2country'. And for anonymous user, user object doesn't have 'country_iso_code_2' value. So, in that case country code needs to be calculated from the given ip address.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇳India pranit84 Faridabad (India)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    With D7 EOL soon going to help triage this issue queue and close out stale D7 tickets. If still a feature or bug on 5.0.x please re-open under that

Production build 0.71.5 2024