Skip to content

Commit

Permalink
Should check proper query implements
Browse files Browse the repository at this point in the history
Instead of checking for instance of JDatabaseQuery should check query implements JDatabaseQueryLimitable interface
  • Loading branch information
ssv445 committed Apr 28, 2016
1 parent 74999ab commit ee1f3e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/joomla/database/driver/mysqli.php
Expand Up @@ -564,7 +564,7 @@ public function execute()
// Take a local copy so that we don't modify the original query and cause issues later
$query = $this->replacePrefix((string) $this->sql);

if (!($this->sql instanceof JDatabaseQuery) && ($this->limit > 0 || $this->offset > 0))
if (!($this->sql instanceof JDatabaseQueryLimitable) && ($this->limit > 0 || $this->offset > 0))
{
$query .= ' LIMIT ' . $this->offset . ', ' . $this->limit;
}
Expand Down

0 comments on commit ee1f3e0

Please sign in to comment.