Skip to content

Commit

Permalink
sync with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
nightflyza committed Mar 19, 2024
1 parent 31f66bb commit 8bad67b
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1 rev 82
0.0.1 rev 83
9 changes: 8 additions & 1 deletion api/libs/api.yalfcore.php
Original file line number Diff line number Diff line change
@@ -319,6 +319,7 @@ protected function setOptions() {

//some custom locale already set
if (@$_COOKIE[$this->cookie_locale]) {
if (is_string($_COOKIE[$this->cookie_locale])) {
$customLocale = preg_replace('/\0/s', '', $_COOKIE[$this->cookie_locale]);
$customLocale = preg_replace("#[^a-z0-9A-Z]#Uis", '', $customLocale);
if (!empty($customLocale)) {
@@ -327,6 +328,7 @@ protected function setOptions() {
}
}
}
}
}
}

@@ -710,7 +712,12 @@ protected function initializeUser($skipcheck = false) {
}

// So we have a cookie, let's extract data from it
$cookie_data = explode(':', $_COOKIE[$this->cookie_user], 2);
if (is_string($_COOKIE[$this->cookie_user])) {
$cookie_data = explode(':', $_COOKIE[$this->cookie_user], 2);
} else {
$cookie_data =array();
}

if (!$skipcheck) {

// If this cookie is invalid - we exiting destroying cookie and exiting with error

0 comments on commit 8bad67b

Please sign in to comment.