prevent the use of not countable parameters in prepared statemant rendering
This commit is contained in:
parent
f6f9ddc7e7
commit
b76507025e
@ -70,10 +70,11 @@ class OxidSQLLogger implements SQLLogger
|
||||
* @param array $params
|
||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
||||
*/
|
||||
public function getPreparedStatementQuery(&$sql, array $params = null)
|
||||
public function getPreparedStatementQuery(&$sql, $params = [])
|
||||
{
|
||||
if (class_exists(d3database::class)
|
||||
&& method_exists(d3database::class, 'getPreparedStatementQuery')
|
||||
&& is_array($params)
|
||||
&& count($params)
|
||||
&& ($query = d3database::getInstance()->getPreparedStatementQuery($sql, $params))
|
||||
&& strlen(trim($query))
|
||||
|
Loading…
x
Reference in New Issue
Block a user