CodeIgniter Forums
Mysqli driver: trans_begin() gone in 3.0.3 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Mysqli driver: trans_begin() gone in 3.0.3 (/showthread.php?tid=63661)



Mysqli driver: trans_begin() gone in 3.0.3 - voidburn - 11-24-2015

Hi guys, 

I updated from 3.0.0 to 3.0.3 and all my manually handled transactions stopped working. Inspecting the driver implementations I found the following changes to the method:

3.0.0: 
public function trans_begin() { ... }

3.0.3: 
protected function _trans_begin() { ... }

is this intended? Am I supposed to derive from this class and implement my own driver or should I simply update all my code to call on the new methods?


RE: Mysqli driver: trans_begin() gone in 3.0.3 - pdthinh - 11-24-2015

(11-24-2015, 09:13 AM)voidburn Wrote: Hi guys, 

I updated from 3.0.0 to 3.0.3 and all my manually handled transactions stopped working. Inspecting the driver implementations I found the following changes to the method:

3.0.0: 
public function trans_begin() { ... }

3.0.3: 
protected function _trans_begin() { ... }

is this intended? Am I supposed to derive from this class and implement my own driver or should I simply update all my code to call on the new methods?

I'm not sure what causes your problem, but the public function trans_begin() still exists in CI_DB_driver class (in system/databases/DB_driver.php)


RE: Mysqli driver: trans_begin() gone in 3.0.3 - kenjis - 11-24-2015

> I updated from 3.0.0 to 3.0.3 and all my manually handled transactions stopped working.

It should work. What's happening? Any error messages?


[SOLVED] Mysqli driver: trans_begin() gone in 3.0.3 - voidburn - 11-25-2015

Thanks for your replies they've set me on the right path to figure out what was happening. I was still unfamiliar with the driver stack, and checking DB_driver.php confirmed the method was there. I was getting this error.

Code:
A PHP Error was encountered

Severity: Error

Message: Call to undefined method CI_DB_mysqli_driver::trans_begin()

Filename: database/DB_driver.php

Line Number: 791


What happened is that when I was updating PhPStorm was unable to completely sync the new files with the server's document root. Once that has been forced manually everything worked.

Thank you!