Permalink
Browse files

Fixes PHP 5.4 Strict errors

  • Loading branch information...
1 parent 5804ccf commit 9b19f9cd742e1a6831d59bc40400636d9f55f520 @ioguix ioguix committed Nov 4, 2012
Showing with 9 additions and 7 deletions.
  1. +1 −1 classes/database/Connection.php
  2. +8 −6 redirect.php
View
2 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
View
14 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'];

0 comments on commit 9b19f9c

Please sign in to comment.