|
From: <var...@us...> - 2021-08-14 17:59:16
|
Revision: 10517
http://sourceforge.net/p/phpwiki/code/10517
Author: vargenau
Date: 2021-08-14 17:59:15 +0000 (Sat, 14 Aug 2021)
Log Message:
-----------
lib/DbSession/PDO.php: bindParam with a variable
Modified Paths:
--------------
trunk/lib/DbSession/PDO.php
Modified: trunk/lib/DbSession/PDO.php
===================================================================
--- trunk/lib/DbSession/PDO.php 2021-08-14 14:54:57 UTC (rev 10516)
+++ trunk/lib/DbSession/PDO.php 2021-08-14 17:59:15 UTC (rev 10517)
@@ -161,6 +161,7 @@
$dbh = $this->_connect();
$table = $this->_table;
$time = time();
+ $remote_addr = $request->get('REMOTE_ADDR');
// postgres can't handle binary data in a TEXT field.
if (is_a($dbh, 'ADODB_postgres64'))
@@ -176,7 +177,7 @@
$sth->bindParam(1, $id, PDO::PARAM_STR, 32);
$sth->bindParam(2, $sess_data, PDO::PARAM_LOB);
$sth->bindParam(3, $time, PDO::PARAM_INT);
- $sth->bindParam(4, $request->get('REMOTE_ADDR'), PDO::PARAM_STR, 15);
+ $sth->bindParam(4, $remote_addr, PDO::PARAM_STR, 15);
if ($result = $sth->execute()) {
$this->_backend->commit();
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|