There was a bug here, whereas the query is perfectly fine, but instead of returning false it was returning the this->sqlError.... which by then was returning the return false, the problem was the log in the cron that was misleading, took 2 days figuring this one out

This commit is contained in:
Tiago Peralta 2017-12-11 02:05:26 +00:00
parent c27db96f05
commit 12cee6e25a

View File

@ -23,8 +23,16 @@ class Notification extends Mail {
$data = json_encode($aData);
$stmt = $this->mysqli->prepare("SELECT id FROM $this->table WHERE data = ? AND active = 1 LIMIT 1");
if ($stmt && $stmt->bind_param('s', $data) && $stmt->execute() && $stmt->store_result() && $stmt->num_rows == 1)
return true;
return $this->sqlError('E0041');
{
return true;
}
if( $stmt->errno )
{
return $this->sqlError();
}
return false;
}
/**