1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge pull request #6812 from rxu/ticket/17506-master

[ticket/17506] Ensure superglobal variables are arrays before applying addition - master
This commit is contained in:
Marc Alexander
2025-05-19 17:44:50 +02:00
committed by GitHub

View File

@@ -70,12 +70,12 @@ class request implements request_interface
foreach ($this->super_globals as $const => $super_global)
{
$this->input[$const] = isset($GLOBALS[$super_global]) ? $GLOBALS[$super_global] : array();
$this->input[$const] = isset($GLOBALS[$super_global]) ? (array) $GLOBALS[$super_global] : array();
}
// simulate request_order = GP
$this->original_request = $this->input[request_interface::REQUEST];
$this->input[request_interface::REQUEST] = $this->input[request_interface::POST] + $this->input[request_interface::GET];
$this->original_request = (array) $this->input[request_interface::REQUEST];
$this->input[request_interface::REQUEST] = (array) $this->input[request_interface::POST] + (array) $this->input[request_interface::GET];
if ($disable_super_globals)
{