Jeremy Newman : fix depreciated code
Module: website Branch: master Commit: 6b0603be401b695c71f9d03d8f9df21cb5f3491e URL: http://source.winehq.org/git/website.git/?a=commit;h=6b0603be401b695c71f9d03... Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Thu Apr 12 15:07:31 2012 -0500 fix depreciated code --- include/html.php | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/html.php b/include/html.php index a90daf0..9b2e83c 100644 --- a/include/html.php +++ b/include/html.php @@ -332,7 +332,8 @@ class html else if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) { // load from web browser environment - $avail = preg_split('/,/', array_shift(preg_split('/;/', $_SERVER["HTTP_ACCEPT_LANGUAGE"]))); + $hal = preg_split("/\;/", $_SERVER["HTTP_ACCEPT_LANGUAGE"]); + $avail = preg_split('/\,/', array_shift($hal)); if (isset($avail[0])) { // if first language is a variation, use the parent language @@ -345,7 +346,7 @@ class html $lang = $avail[0]; } } - unset($avail); + unset($hal, $avail); } // return language
participants (1)
-
Jeremy Newman