Giter Site home page Giter Site logo

Comments (8)

caioiglesias avatar caioiglesias commented on August 27, 2024 1

It only works when ALL the vars are set to "private" at the beggining of the REST_controller file too, not just all the other ones switched to "protected" everywhere on the last commit:

private $rest_format = NULL; // Set this in a controller to use a default format private $methods = array(); // contains a list of method properties such as limit, log and level private $request = NULL; // Stores accept, language, body, headers, etc private $response = NULL; // What is gonna happen in output? private $rest = NULL; // Stores DB, keys, key level, etc private $_get_args = array(); private $_post_args = array(); private $_put_args = array(); private $_delete_args = array(); private $_args = array(); private $_allow = TRUE;

from codeigniter-restserver.

caioiglesias avatar caioiglesias commented on August 27, 2024

weirdly I got the exact same message.

from codeigniter-restserver.

caioiglesias avatar caioiglesias commented on August 27, 2024

I have it working on a 1.6 CI updated to 2.0.2, but on a 2.0.2 clean install this is happening.

I changed all visibility 'protected' back to 'private' and it is now working again.

Basically this was undone: 4b7bf25

from codeigniter-restserver.

dbashyal avatar dbashyal commented on August 27, 2024

i think i did same thing to make it work.

from codeigniter-restserver.

caioiglesias avatar caioiglesias commented on August 27, 2024

Great!

I just checked that my previous working install didn't have that commit I linked earlier, so there's nothing to do with the codeigniter update or clean install. It was just a thought.

from codeigniter-restserver.

philsturgeon avatar philsturgeon commented on August 27, 2024

Let's assume this is CI 2.0.2 being weird. Did anyone do any debugging? Is this happening on 2.0.1 or 2.0.3-ish?

from codeigniter-restserver.

caioiglesias avatar caioiglesias commented on August 27, 2024

I thought it was CI related because it was happening on the clean install and not the one I upgraded from 1.6, but what actually changed from one install to the other was that commit I linked earlier: protected vs. private.

My error log fills up with this on CI 2.0.2 with the current codeigniter-restserver version:

[Wed Jul 20 23:22:50 2011] [error] [client 189.100.171.15] PHP Fatal error:  Cannot access protected property Example::$rest in /var/www/mydomain.com/system/core/Loader.php on line 946

from codeigniter-restserver.

RiyadKhalifeh avatar RiyadKhalifeh commented on August 27, 2024

Thanks @caioiglesias
Work like a charm !!

from codeigniter-restserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.