Perhaps a fix for cakephp1.2 calling non-static methods

This commit is contained in:
Karl Cordes 2016-05-01 13:29:46 +10:00
parent e8de034c56
commit 332da5bb28

View file

@ -130,7 +130,7 @@ class Configure extends Object {
* @return Configure instance * @return Configure instance
* @access public * @access public
*/ */
function &getInstance($boot = true) { static function &getInstance($boot = true) {
static $instance = array(); static $instance = array();
if (!$instance) { if (!$instance) {
$instance[0] =& new Configure(); $instance[0] =& new Configure();
@ -323,7 +323,7 @@ class Configure extends Object {
* @return string value of Configure::$var * @return string value of Configure::$var
* @access public * @access public
*/ */
function read($var = 'debug') { static function read($var = 'debug') {
$_this =& Configure::getInstance(); $_this =& Configure::getInstance();
if ($var === 'debug') { if ($var === 'debug') {
@ -1191,4 +1191,4 @@ class App extends Object {
} }
} }
} }
?> ?>