[php] notice
 
php.programer 3. mar 2015 07:38:51 Pridružen od:
20. sep 2011
347 objav
154 106 10
#1

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.


všeč(1) ni všeč(0) spam(0)
 
twosocks 3. mar 2015 07:46:19 Pridružen od:
20. mar 2009
1297 objav
1253 89 21
všeč(1) ni všeč(0) spam(0)
 
php.programer 3. mar 2015 09:51:29 Pridružen od:
20. sep 2011
347 objav
154 106 10
#3

ni joomla, codeigniter application.


všeč(1) ni všeč(0) spam(0)
 
twosocks 3. mar 2015 10:02:00 Pridružen od:
20. mar 2009
1297 objav
1253 89 21
#4

php.programer:

ni joomla, codeigniter application.




ideja je ista, si preveril?


všeč(1) ni všeč(0) spam(0)
 
php.programer 13. apr 2015 06:03:47 Pridružen od:
20. sep 2011
347 objav
154 106 10
#5

sem dela. hvala.


všeč(1) ni všeč(0) spam(0)
 
 

🔒 Za odgovor na to temo se moraš prijaviti.

Prijavi se