Skip to content

Commit

Permalink
Fix. Modules. SQLs. Fix for incorrect data gain.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandergull committed Aug 5, 2024
1 parent 7d7c2d8 commit 954d6f7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Modules/SQLs.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,21 @@ public function processRequest($sql)
{
$sql = $sql->toArray();

if (
!isset($sql[0]) ||
!is_object($sql[0]) ||
!is_object(reset($sql)) ||
!is_object(end($sql))
) {
return;
}

// Prevent from duplicating SQLs
foreach ( $this->requests as $request ) {
if ( $request['sql'][0] == $sql[0] ) { // '==' because we compare objects
if (
! isset($request['sql'], $request['sql'][0]) || // if not set
$request['sql'][0] == $sql[0] // '==' because we compare objects
) {
return;
}
}
Expand Down

0 comments on commit 954d6f7

Please sign in to comment.