<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">Istvan,</span><br><div><span style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">We have fixed it.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">Regards,</span></div><div><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">Prasad</span></div>
</div><div class="gmail_extra"><br clear="all"><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><b>Connect with us on: </b><a href="http://twitter.com/vtigercrm" style="color:rgb(0,0,204)" target="_blank">Twitter</a> <b>I</b> <a href="http://www.facebook.com/pages/vtiger/226866697333578?sk=wall" style="color:rgb(0,0,204)" target="_blank">Facebook</a> <b>I</b> <a href="https://blogs.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Blog</a><b> I</b> <a href="http://wiki.vtiger.com/index.php/Main_Page" style="color:rgb(0,0,204)" target="_blank">Wiki</a> <b>I </b><a href="https://discussions.vtiger.com" style="color:rgb(0,0,204)" target="_blank">Forums </a><b>I</b> <a href="https://www.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Website</a></span></div>
<br><br><div class="gmail_quote">On Sun, Aug 24, 2014 at 2:11 AM, Holbok István <span dir="ltr"><<a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hello Prasad,<br>
<br>
There is an serious bug in the changeset #14217 relating to the
mysqli support.<br>
There was a change in \include\database\PearDatabase.php in
function function disconnect().<br>
<a href="http://trac.vtiger.com/cgi-bin/trac.cgi/changeset/14217" target="_blank">http://trac.vtiger.com/cgi-bin/trac.cgi/changeset/14217</a><br>
<br>
function disconnect() {<br>
$this->println("ADODB disconnect");<br>
if(isset($this->database)){<br>
if($this->dbType == "mysql"){<br>
mysql_close($this->database);<br>
<b><font color="#ff0000"> } else
if($this->dbType=="mysqli"){<br>
mysqli_close($this->database);</font></b><br>
} else {<br>
$this->database->disconnect();<br>
}<br>
unset($this->database);<br>
}<br>
}<br>
<br>
The red lines shows the added, new lines. The command <b><font color="#ff0000"> mysqli_close($this->database);</font></b>
unfortunately wrong.<br>
<br>
The right command would be: according to the ...\libraries\adodb\drivers\adodb-mysqli.inc.php
line ~ 669 <br>
// returns true or false<br>
function _close()<br>
{<br>
@mysqli_close($this->_connectionID);<br>
$this->_connectionID = false;<br>
}<br>
<br>
---------------------------<br>
<b>The right command</b> to close mysqli database is: <font color="#3333ff"><b>mysqli_close($this->database->_connectionID);</b></font>
<br>
<br>
It really closes the database. The modification from the changeset
#14217 will not close the database but will give a worning:<br>
Warning: mysqli_close() expects parameter 1 to be mysqli, object
given in ....\include\database\PearDatabase.php on line 875 <br>
<br>
And in the debugging/developing settings, <i><b>vtiger </b></i>will
echo this warning message even to the JSON output of
Vtiger_Response(), so all AJAX responses could be broken. My AJAX in
my CustomModule was broken and I hunted the cause for 2 days and I
have found it in the above described.<br>
<br>
Note: Analogous to the mysqli, may the
mysql_close($this->database) would be also wrong.<br>
<br>
Kindest regards:<br>
Istvan<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<div>-- <br>
üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
</font></span></div>
</blockquote></div><br></div>