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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:27:49+00:00 2026-06-08T11:27:49+00:00

I have setup a login helper within my codeigniter setup. I get the codeigniter

  • 0

I have setup a login helper within my codeigniter setup.

I get the codeigniter instance, call a model, and set some variables.

$CI =& get_instance();

I then use $CI->load->vars($data); to make the variables available in all my models and views.

One of the variables is as follows $data->errors=array();

The idea being that if there is an error in my model I can set an error
e.g if($query->num_rows()!='1'){$this->error[]="This message does not exist !";}

Then in my controllers I can check if this variable is populated and if it is display the error.

This is however throwing up the error

Message: Indirect modification of overloaded property Mail_model::$error has no effect

This error is going over my head. I’ve done some research into the error but cant find any explanation in lehmans terms with an applicable solution.

Could anyone help me out?

  • 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-06-08T11:27:50+00:00Added an answer on June 8, 2026 at 11:27 am

    You have loaded the $CI variable as a reference to itself – with =&

    You have then loaded the variables through the reference – because you used $CI->load->vars()

    There is no need to load the $data into the $CI reference.

    If you want to pass messages between models and controllers (such as error messages) – then trying to use global variables is probably not the best way.

    The best option for CodeIgniter is Flashdata – this is the exact scenario why flashdata exists. You can read all about it in the CI userguide.

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

Sidebar

Related Questions

I have setup a new EC2 instance on AWS and I'm trying to get
I have a login setup on a site that stores login information in PHP's
I have facebook login setup in my android app. When the user clicks login
So, I have set up a login page that verifies the user's credentials, and
I have setup ability for a user to specify some settings using the in-built
I have setup mappings for a number of classes, however in some scenarios I
I have setup some simple associations in my rails app: resources :properties do resources
I have setup a fresh install of codeigniter 2x and modular extensions (https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home) It
I have setup emacs -daemon to run on login to Gnome and associated emacsclient
I have setup a login page login.jsp . Whenever I go to login.jsp and

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.