[php] notice

Pozdravljeni,

dobim tak notice v php-ju.

A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 243

Source:
function &getconfig($replace = array())
{
static $
config;
if (isset($config))
{
return $
config[0];
}
// Is the config file in the environment folder?
if ( ! defined('ENVIRONMENT') OR ! fileexists($filepath = APPPATH.'config/'.ENVIRONMENT.'/config'.EXT))
{
$filepath = APPPATH.'config/config'.EXT;
}
// Fetch the config file
if ( ! file
exists($filepath))
{
exit('The configuration file does not exist.');
}
require($file
path);
// Does the $config array exist in the file?
if ( ! isset($config) OR ! isarray($config))
{
exit('Your config file does not appear to be formatted correctly.');
}
// Are any values being dynamically replaced?
if (count($replace) > 0)
{
foreach ($replace as $key => $val)
{
if (isset($config[$key]))
{
$config[$key] = $val;
}
}
}
return $
config[0] =& $config;
}

kako bi se rešil tega notica? je zgolj notice, vendar je napaka v vrstici:
return $_config[0] =& $config;

Hvala za vašo pomoč in trud.

4 odgovori

ni joomla, codeigniter application.

1

php.programer:
ni joomla, codeigniter application.

ideja je ista, si preveril?

1

sem dela. hvala.

1