projects
/
e-DoKo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef06301
)
fix error when language is not set
master
author
Arun Persaud
<arun@nubati.net>
Sun, 27 May 2018 18:52:43 +0000
(11:52 -0700)
committer
Arun Persaud
<arun@nubati.net>
Sun, 27 May 2018 18:54:39 +0000
(11:54 -0700)
include/functions.php
patch
|
blob
|
history
diff --git
a/include/functions.php
b/include/functions.php
index f3495a4a5482e2f22e7d063a096abdf6b5d61550..ee02b0a9438c2f6c6c1039dacef3880d4feafbda 100644
(file)
--- a/
include/functions.php
+++ b/
include/functions.php
@@
-1715,9
+1715,14
@@
function verify_password($email, $password)
function detectlanguage()
{
/* read out browser's prefered language, taken from php-manual*/
function detectlanguage()
{
/* read out browser's prefered language, taken from php-manual*/
- $langcode = explode(";", $_SERVER['HTTP_ACCEPT_LANGUAGE']);
- $langcode = explode(",", $langcode['0']);
- return $langcode['0'];
+ if(isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]))
+ {
+ $langcode = explode(";", $_SERVER['HTTP_ACCEPT_LANGUAGE']);
+ $langcode = explode(",", $langcode['0']);
+ return $langcode['0'];
+ }
+ else
+ return 'en';
}
function set_language($l,$type='lang')
}
function set_language($l,$type='lang')