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

[eluser]Skeleton Man[/eluser]
Hi,

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:

Code:
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

Chris
#2

[eluser]WanWizard[/eluser]
It is fixed in this commit. You can either apply this to your version, or get the latest version of the library from bitbucket.
#3

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




Theme © iAndrew 2016 - Forum software by © MyBB