#5607: Configure::store can no longer be uses statically
---------------------------------------+------------------------------------
Reporter: ADmad | Type: Bug
Status: new | Priority: Medium
Milestone: 1.2.x.x | Component: Core Libs
Version: RC3 | Severity: Normal
Keywords: Configure::store ADmad | Php_version: n/a
Cake_version: |
---------------------------------------+------------------------------------
In the latest changeset (rev. 7745) trying to use Configure::store(..)
statically from a controller i get error similar to:
{{{
Fatal error: Call to undefined method UsersController::read() in
{..}/cake/libs/configure.php on line 515
}}}
Line 515 is inside this function:
{{{
function __writeConfig() {
..
if ($this->read() > 0) { //Line 515
..
}
}}}
The problem started occurring after changeset #7733. Before this changeset
a singleton instance $_this was used to call read() but now the $this
seems to incorrectly refer to the controller object instead of
configure.[[BR]]
[[BR]]
Looking at the code this behavior is expected but i think one should be
able to call "store" statically like we could earlier.
[[BR]]
[[BR]]
I have attached a diff against configure.test.php. I would like to point
out that due to the changes i have done the test doesn't actually show any
fail/pass report. I had asked renan_saddam to check it and he confirmed
that same.
--
Ticket URL: <https://trac.cakephp.org/ticket/5607>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---