Merge pull request #7554 from nextcloud/fix-7546

Fix default parameter of OC_DB::executeAudited()
This commit is contained in:
Morris Jobke 2017-12-18 15:24:11 +01:00 committed by GitHub
commit 913cb2b9c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,11 +105,11 @@ class OC_DB {
* @param mixed $stmt OC_DB_StatementWrapper,
* an array with 'sql' and optionally 'limit' and 'offset' keys
* .. or a simple sql query string
* @param array|null $parameters
* @param array $parameters
* @return OC_DB_StatementWrapper
* @throws \OC\DatabaseException
*/
static public function executeAudited( $stmt, array $parameters = null) {
static public function executeAudited( $stmt, array $parameters = []) {
if (is_string($stmt)) {
// convert to an array with 'sql'
if (stripos($stmt, 'LIMIT') !== false) { //OFFSET requires LIMIT, so we only need to check for LIMIT