From 50a7167c9a76404a1e3cfb207b303920ce2b3827 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 19 Aug 2015 16:12:01 -0700 Subject: [ticket/14116] sql_affectedrows method has no arguments PHPBB3-14116 --- phpBB/phpbb/config/db_text.php | 4 ++-- phpBB/phpbb/db/driver/driver.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/config/db_text.php b/phpBB/phpbb/config/db_text.php index ddc7c9aef0..818f6bdcc9 100644 --- a/phpBB/phpbb/config/db_text.php +++ b/phpBB/phpbb/config/db_text.php @@ -100,9 +100,9 @@ class db_text $sql = 'UPDATE ' . $this->table . " SET config_value = '" . $this->db->sql_escape($value) . "' WHERE config_name = '" . $this->db->sql_escape($key) . "'"; - $result = $this->db->sql_query($sql); + $this->db->sql_query($sql); - if (!$this->db->sql_affectedrows($result)) + if (!$this->db->sql_affectedrows()) { $sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array( 'config_name' => (string) $key, diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index 9fc04d47a1..1b49775b32 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -962,7 +962,7 @@ abstract class driver implements driver_interface { if (preg_match('/^(UPDATE|DELETE|REPLACE)/', $query)) { - $this->sql_report .= 'Affected rows: ' . $this->sql_affectedrows($this->query_result) . ' | '; + $this->sql_report .= 'Affected rows: ' . $this->sql_affectedrows() . ' | '; } $this->sql_report .= 'Before: ' . sprintf('%.5f', $this->curtime - $starttime) . 's | After: ' . sprintf('%.5f', $endtime - $starttime) . 's | Elapsed: ' . sprintf('%.5f', $endtime - $this->curtime) . 's'; } -- cgit v1.2.1