lang error with more exact error reporting
Posted: Thu Dec 08, 2011 1:20 pm
On my way tracking errors with our development version, I found the included lang.inc throw an error of missing $serendipity['lang'] in langfile includement.
Right on top of this file there is: which does not set $serendipity['lang'], as missing a [!].
As far as I can see, passing through without further errors (regarding lang) and having no negative effects to real language set later on, the error can be dropped by using If adding this is OK, I proceed.
Right lang inclusion and set correct lang seems quite complicated though.
(I know, its not really a bug, as it does not error and still sets the right lang later on when silencing error reporting to "Fatal" only.)
Right on top of this file there is:
Code: Select all
if (isset($serendipity['lang']) && !isset($serendipity['languages'][$serendipity['lang']])) {
$serendipity['lang'] = $serendipity['autolang'];
}
As far as I can see, passing through without further errors (regarding lang) and having no negative effects to real language set later on, the error can be dropped by using
Code: Select all
if (!isset($serendipity['lang']) && ...Right lang inclusion and set correct lang seems quite complicated though.
(I know, its not really a bug, as it does not error and still sets the right lang later on when silencing error reporting to "Fatal" only.)