EllisLab text mark
Advanced Search
     
unable to _return_ language strings after already loaded
Posted: 31 October 2007 12:08 AM   [ Ignore ]
Avatar
Joined: 2006-06-23
370 posts

Applies to CI v1.5.4

Once a language file has been loaded, the CI_Language::load() function will no longer honor the $return parameter to simply return the language strings.

Lines 56-59 of CI_Language::load():

if (in_array($langfile$this->is_loadedTRUE))
{
    
return;

That code should also check the $return parameter rather than just halting.

Reproducible steps:

1. Load a language file normally.

$this->lang->load('some_category''german'); 

2. Attempt to get the values stored in the same language file:

$some_strings $this->lang->load('some_category''german'TRUE); 

The TRUE would no longer be honored since the file had already been loaded once.

 Signature 

Mac OS X 10.8, Apache 2.x, NGiNX, PHP 5.4.x, CodeIgniter 1.7.2/2.1.3