Welcome Guest, Not a member yet? Register   Sign In
Data Mapper bug

[eluser]Skeleton Man[/eluser]

Every time I access one of my models that extend datamapper, I get this error:

Quote:Debug Strict (PHP 5): /application/libraries/datamapper.php line 6766 - Accessing static property My_model_name::$config as non static

Where "My_model_name" is the name of a model such as "users", "messages", etc.

Here's the section of datamapper code covering line 6766:

protected function _dmz_assign_libraries()
        static $CI;
        if ($CI || $CI =& get_instance())
            // make sure these exists to not trip __get()
            $this->load = NULL;
            $this->config = NULL;
            $this->lang = NULL;

Note that $config is defined as static, yet in the above code it's being referenced as $this->config. I have strict debugging on to catch unset variables, etc while debugging my own, and it's very frustrating having to wade through dozens of "static property as non static" errors.

I'm running Data Mapper ORM 1.8.2


It is fixed in this commit. You can either apply this to your version, or get the latest version of the library from bitbucket.

[eluser]Skeleton Man[/eluser]
Great, thanks!

Theme © iAndrew 2016 - Forum software by © MyBB