From 5293f41f0c946fd15f02ac17063e755eba2dd518 Mon Sep 17 00:00:00 2001 From: vargenau Date: Thu, 17 Jul 2014 09:33:21 +0000 Subject: [PATCH] Add braces git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@8971 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/DbSession/PDO.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/DbSession/PDO.php b/lib/DbSession/PDO.php index 0479a960d..99318b967 100644 --- a/lib/DbSession/PDO.php +++ b/lib/DbSession/PDO.php @@ -100,17 +100,23 @@ class DbSession_PDO $table = $this->_table; $sth = $dbh->prepare("SELECT sess_data FROM $table WHERE sess_id=?"); $sth->bindParam(1, $id, PDO::PARAM_STR, 32); - if ($sth->execute()) $res = $sth->fetchColumn(); - else $res = ''; + if ($sth->execute()) { + $res = $sth->fetchColumn(); + } else { + $res = ''; + } $this->_disconnect(); - if (!empty($res) and isa($dbh, 'ADODB_postgres64')) + if (!empty($res) and isa($dbh, 'ADODB_postgres64')) { $res = base64_decode($res); + } if (strlen($res) > 4000) { trigger_error("Overlarge session data! " . strlen($res) . " gt. 4000", E_USER_WARNING); $res = preg_replace('/s:6:"_cache";O:12:"WikiDB_cache".+}$/', "", $res); $res = preg_replace('/s:12:"_cached_html";s:.+",s:4:"hits"/', 's:4:"hits"', $res); - if (strlen($res) > 4000) $res = ''; + if (strlen($res) > 4000) { + $res = ''; + } } return $res; } -- 2.45.0