diff options
author | Jehan-Guillaume (ioguix) de Rorthais | 2012-11-04 11:36:57 +0000 |
---|---|---|
committer | Jehan-Guillaume (ioguix) de Rorthais | 2012-11-04 11:36:57 +0000 |
commit | 9b19f9cd742e1a6831d59bc40400636d9f55f520 (patch) | |
tree | 427d9bdc4e84c38fb634a8746d8a04a8d1ea08d0 | |
parent | 5804ccfbdad9b0b4d1f9ad347f6aabe6daf25cb2 (diff) |
Fixes PHP 5.4 Strict errors
-rwxr-xr-x | classes/database/Connection.php | 2 | ||||
-rw-r--r-- | redirect.php | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/classes/database/Connection.php b/classes/database/Connection.php index ebf3991d..5d3ce4f0 100755 --- a/classes/database/Connection.php +++ b/classes/database/Connection.php @@ -20,7 +20,7 @@ class Connection { * @param $fetchMode Defaults to associative. Override for different behaviour */ function Connection($host, $port, $sslmode, $user, $password, $database, $fetchMode = ADODB_FETCH_ASSOC) { - $this->conn = &ADONewConnection('postgres7'); + $this->conn = ADONewConnection('postgres7'); $this->conn->setFetchMode($fetchMode); // Ignore host if null diff --git a/redirect.php b/redirect.php index 70485964..f31aa086 100644 --- a/redirect.php +++ b/redirect.php @@ -10,17 +10,19 @@ // Load query vars into superglobal arrays if (isset($url['urlvars'])) { - $vars = array(); - parse_str(value(url($url['url'], $url['urlvars']), $_REQUEST), $vars); - array_shift($vars); + $urlvars = array(); + + foreach($url['urlvars'] as $k => $urlvar) { + $urlvars[$k] = value($urlvar, $_REQUEST); + } /* parse_str function is affected by magic_quotes_gpc */ if (ini_get('magic_quotes_gpc')) { - $misc->stripVar($vars); + $misc->stripVar($urlvars); } - $_REQUEST = array_merge($_REQUEST, $vars); - $_GET = array_merge($_GET, $vars); + $_REQUEST = array_merge($_REQUEST, $urlvars); + $_GET = array_merge($_GET, $urlvars); } require $url['url']; |