Skip to content

Commit 12cee6e

Browse files
committed
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
1 parent c27db96 commit 12cee6e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

include/classes/notification.class.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@ public function isNotified($aData) {
2323
$data = json_encode($aData);
2424
$stmt = $this->mysqli->prepare("SELECT id FROM $this->table WHERE data = ? AND active = 1 LIMIT 1");
2525
if ($stmt && $stmt->bind_param('s', $data) && $stmt->execute() && $stmt->store_result() && $stmt->num_rows == 1)
26-
return true;
27-
return $this->sqlError('E0041');
26+
{
27+
return true;
28+
}
29+
30+
if( $stmt->errno )
31+
{
32+
return $this->sqlError();
33+
}
34+
35+
return false;
2836
}
2937

3038
/**

0 commit comments

Comments
 (0)