Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6390085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:29:00+00:00 2026-05-25T03:29:00+00:00

hi I working with Drupal and it uses arrays to a level I’m not

  • 0

hi I working with Drupal and it uses arrays to a level I’m not very familier with, I’ve a quick question which is what is the difference between these ‘selectors'(is that the right term)?

This causes an error “Fatal error: Cannot use object of type stdClass as array in…”

$node['field_geoloc'] 

this works (im using it in an if != null statement)

$node->field_geoloc

hopefully an easy question…
thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:29:01+00:00Added an answer on May 25, 2026 at 3:29 am

    Pretty easy.. the error says it all:

    “Fatal error: Cannot use object of type stdClass as array in…”

    You are attempting to use an object as an array.

    Object properties aren’t accessibly using the $array['key'] method that you are used to. You need to access properties like:

    `$object->property`
    

    If you have an object, you can get the properties from that array by using the get_object_vars method. But I know from experience that you should not use that method with a $node in Drupal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Drupal mobile site which is powered by the Mobile module.
We're building a very content rich site in Drupal. It's my first time working
I'm working at a company that uses Drupal 6 to host documentation for it's
I am working on a drupal 6.x module which consists of several page as
I'm currently working on a Drupal site (6.*), which when in production mode will
I'm working on a Drupal based system that will not be directly handling login
Im working on a drupal site that uses jQtouch (for iphone), and im trying
I am working in Drupal 7. I am looking for access control module which
I am working on a Drupal module proving RSS feed generation (though not posting
I've got Drupal working on a shared host, and I uploaded some modules from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.