From: <var...@us...> - 2014-10-07 14:19:21
|
Revision: 9215 http://sourceforge.net/p/phpwiki/code/9215 Author: vargenau Date: 2014-10-07 14:19:17 +0000 (Tue, 07 Oct 2014) Log Message: ----------- Only variables can be passed by reference Modified Paths: -------------- trunk/lib/WikiDB/backend/PDO.php Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2014-10-07 14:16:56 UTC (rev 9214) +++ trunk/lib/WikiDB/backend/PDO.php 2014-10-07 14:19:17 UTC (rev 9215) @@ -638,11 +638,14 @@ $insert = $dbh->prepare("INSERT INTO $version_tbl" . " (id,version,mtime,minor_edit,content,versiondata)" . " VALUES(?,?,?,?,?,?)"); + $version_plus_1 = $version + 1; + $zero = 0; + $empty_string = ''; $insert->bindParam(1, $id, PDO::PARAM_INT); - $insert->bindParam(2, $version + 1, PDO::PARAM_INT); + $insert->bindParam(2, $version_plus_1, PDO::PARAM_INT); $insert->bindParam(3, $mtime, PDO::PARAM_INT); - $insert->bindParam(4, 0, PDO::PARAM_INT); - $insert->bindParam(5, '', PDO::PARAM_STR, 100); + $insert->bindParam(4, $zero, PDO::PARAM_INT); + $insert->bindParam(5, $empty_string, PDO::PARAM_STR, 100); $insert->bindParam(6, $this->_serialize($meta), PDO::PARAM_STR, 100); if ($insert->execute() and $dbh->query("DELETE FROM $nonempty_tbl WHERE id=$id") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |