diff options
author | jerkob <jsterry@gmail.com> | 2020-01-28 17:20:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 17:20:47 +0100 |
commit | 1cce9697265382853d9646ae3963fc20e6e97aa9 (patch) | |
tree | 76ceacd37e6a8bc63698486d54ee293c1a02f748 /system/database | |
parent | dc8ebd3a5abaabe69e23f95097594ab4d431944f (diff) |
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.
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/DB_driver.php | 8 |
1 files changed, 4 insertions, 4 deletions
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; } // -------------------------------------------------------------------- |