1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-07 16:15:22 +02:00

Fix bug #47785 - Fetch requested cookie variables directly from cookie super global.

This should fix a problem with phpBB installations on PHP 5.3

Authorised by: naderman

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9728 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Andreas Fischer 2009-07-07 15:18:11 +00:00
parent fd667f9932
commit a6f088992b
2 changed files with 4 additions and 2 deletions

View File

@ -161,6 +161,7 @@
<li>[Change] &quot;Post details&quot; links with image in MCP. (Bug #39845 - Patch by leviatan21)</li>
<li>[Change] Pm history only shows pms of the receipts you currently reply to (Bug #39505 - Patch by nickvergessen)</li>
<li>[Change] Add quote-button for own pm's in pm-history (Bug #37285 - Patch by nickvergessen)</li>
<li>[Change] Fetch requested cookie variables directly from cookie super global. (Bug #47785)</li>
<li>[Feature] Add confirmation for deactivating styles (Bug #14304 - Patch by leviatan21)</li>
<li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li>
<li>[Feature] Add confirmation for deactivating language packs (Patch by leviatan21)</li>

View File

@ -71,12 +71,13 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
$_REQUEST[$var_name] = isset($_POST[$var_name]) ? $_POST[$var_name] : $_GET[$var_name];
}
if (!isset($_REQUEST[$var_name]) || (is_array($_REQUEST[$var_name]) && !is_array($default)) || (is_array($default) && !is_array($_REQUEST[$var_name])))
$super_global = ($cookie) ? '_COOKIE' : '_REQUEST';
if (!isset($$super_global[$var_name]) || is_array($$super_global[$var_name]) != is_array($default))
{
return (is_array($default)) ? array() : $default;
}
$var = $_REQUEST[$var_name];
$var = $$super_global[$var_name];
if (!is_array($default))
{
$type = gettype($default);