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 7589995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:18:02+00:00 2026-05-30T20:18:02+00:00

Working in CI 2.1.0 and getting a Call to a member function set() on

  • 0

Working in CI 2.1.0 and getting a “Call to a member function set() on a non-object…” error with the code excerpt looping through the array below. Seemingly it’s an array of all strings so I’m having trouble seeing why it seems to fail in the middle.

Any insights as to what’s going on would be great. Researched other questions on this error, but still at a loss.

Code excerpt:
foreach($data['jobs'] as $job)
{
foreach($job as $key=>$value){
  $job->set($key,$value);

}

}

$data[‘jobs’] array:

    Array ( [0] => Array ( [job_id] => 149 [company] => Minnesota Life Insurance [location] => Barrington, IL [start_date] => March '98 [end_date] => June '98 [description] =>
Primary responsibility was research and design of sales and training presentations.
Responsible for scheduling a three person sales and training staff.
[title] => Administrative Secretary [resume_id] => 96 [order_id] => 0 [profile_id] => 38 [user_id] => 1 [vanity_name] => Sample of Template 3 [template_id] => 3 [date_add] => 0000-00-00 00:00:00 [date_mod] => 2012-03-04 11:00:05 ) [1] => Array ( [job_id] => 150 [company] => Manpower Temporary Services [location] => Naperville, IL [start_date] => Dec' 04 [end_date] => June '98 [description] =>
Assigned to GE Silicones in the industrial sales division.
Responsible for analysis of monthly, weekly, and, daily sales reports.
Responsible for scheduling training classes, seminars, and conferences
[title] => Independent Contractor [resume_id] => 96 [order_id] => 1 [profile_id] => 38 [user_id] => 1 [vanity_name] => Sample of Template 3 [template_id] => 3 [date_add] => 0000-00-00 00:00:00 [date_mod] => 2012-03-04 11:00:05 ) [2] => Array ( [job_id] => 151 [company] => KSMR Radio 92.5/94.3FM [location] => Winona, MN [start_date] => May '96 [end_date] => May '97 [description] =>
In charge of a 36 member staff, as well as a 7 member management team, with duties that include disciplinary actions, budgeting, special requests, program scheduling, and hiring.
Balancing a $15,000 dollar budget, as well as chairing a committee to receive a grant for increasing station amenities such as wattage, equipment, space, and music library.
[title] => General Manager [resume_id] => 96 [order_id] => 2 [profile_id] => 38 [user_id] => 1 [vanity_name] => Sample of Template 3 [template_id] => 3 [date_add] => 0000-00-00 00:00:00 [date_mod] => 2012-03-04 11:00:05 ) ) 
  • 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-30T20:18:03+00:00Added an answer on May 30, 2026 at 8:18 pm

    It’s because $job isn’t a class, thats why your getting the ‘call to a member function set() on a non-object‘ – $job is an array. You have to access it like the following.

     $job['job_id'] = 149;
     $job['company'] = 'Minnesota Life Insurance';
    

    Maybe you want to transfer the values of $job into a class?

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

Sidebar

Related Questions

Why isn't redirect working here. I'm getting call to undefined function redirect(). class Login
I am working on getting parameter from a function string. For example, my function
onReceive is never getting call!! I had this working and I made some changes
I'm working with sockets in C# and I'm getting the following error: A request
Just getting started with Android development and Java. So, here's the code I'm working
as you see in the code below. I have a jQuery function called externally.
In my just-completed project, I was working getting distributed transactions working. We implemented this
I'm working on getting an Introduction to Groovy presentation ready for my local Java
I've been working on getting a 2.5 module ported to 3.0, mostly for my
I am working on getting familiar with the Android SDK and I have having

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.