[eluser]Unknown[/eluser]
I have a very strange bug in standard CI_EMail class CI 1.5.4.
When, happend the call to _get_smtp_data() method, we have a good execution, when while breaks in $data integer we have a good response and all seems ok.
But, then the happend the return($data) - data not send, method don't stop!
If we call in that function some like return("foo") - noting happend too.
But, if i remove fgets() function - return() work.
What is it???
I have Apache 2.2, PHP 5.2.3 as module, all running on licensed Windows Server 2003, what happend?
return() not fired
Code:
/**
* Get SMTP data
*
* @access private
* @return string
*/
function _get_smtp_data()
{
$data = "";
while ($str = fgets($this->_smtp_connect, 512))
{
$data .= $str;
if (substr($str, 3, 1) == " ")
break;
}
return($data);
}
But, all seems good, in this - we have a good data
Code:
/**
* Get SMTP data
*
* @access private
* @return string
*/
function _get_smtp_data()
{
$data = "";
while ($str = fgets($this->_smtp_connect, 512))
{
$data .= $str;
if (substr($str, 3, 1) == " ")
break;
}
die($data); // data is ok!
//return($data);
}