[php] notice
2 naročnika
2 naročnika
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 ( ! fileexists($filepath))
{
exit('The configuration file does not exist.');
}
require($filepath);
// 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
Stara Joomla?
Si preveril Google, kot je recimo: http://stackoverflow.com/questions/28348879/only-variable-references-should-be-returned-by-reference-codeigniter