From 1cce9697265382853d9646ae3963fc20e6e97aa9 Mon Sep 17 00:00:00 2001 From: jerkob Date: Tue, 28 Jan 2020 11:20:47 -0500 Subject: Replace `trans_depth()` with `trans_active()` Per code review, replace `trans_depth()` function that returns the protected `_trans_depth` property with a `trans_active()` function that returns a boolean indicating whether a transaction is currently active. --- system/database/DB_driver.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'system/database') diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 733522284..96becd767 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -829,13 +829,13 @@ abstract class CI_DB_driver { // -------------------------------------------------------------------- /** - * Lets you retrieve the transaction depth + * Returns whether a transaction is currently active * - * @return int + * @return bool */ - public function trans_depth() + public function trans_active() { - return $this->_trans_depth; + return (bool) $this->_trans_depth; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b