VOI
Member
Hi,
there seems to be a bug with the $origData function to track data changes:
from time to time a bug occure by using following php code:
When bug occures a mail is sent although no data change was performed. Our log files indicates that origData delivers "NULL" although value has been set in data base before. Could you please check?
Unfortunately the bug do not appear in any case and is not reproducable properly.
Best Regards
Michael
there seems to be a bug with the $origData function to track data changes:
from time to time a bug occure by using following php code:
Code:
$db = JFactory::getDbo();
$mails = '';
// new CCT Leader
$query = "SELECT `md_cct_email` FROM `master_data` WHERE `md_cct_id` = '".$this->data['projects___cct_raw'][0]."'";
$db->setQuery($query);
if($db->query()) {
$emails = $db->loadColumn();
foreach($emails as $email)
$mails.= ",".$email;
}
// old CCT Leader
$origData = $formModel->getOrigData();
$db->getquery(true);
$query = "SELECT `md_cct_email` FROM `master_data` WHERE `md_cct_id` = '".$origData[0]->projects___cct_raw."'";
$db->setQuery($query);
if($db->query()) {
$emails = $db->loadColumn();
foreach($emails as $email)
$mails.= ",".$email;
}
return ltrim($mails,",");
When bug occures a mail is sent although no data change was performed. Our log files indicates that origData delivers "NULL" although value has been set in data base before. Could you please check?
Unfortunately the bug do not appear in any case and is not reproducable properly.
Best Regards
Michael