Skip to content

Commit

Permalink
Fixed issue #17208: avoid column name must be either a string or an a…
Browse files Browse the repository at this point in the history
…rray during survey taking (#1825)

Dev: some response table can have broken primaryKey, avoid public DB issue
  • Loading branch information
Shnoulle committed Apr 3, 2021
1 parent 9cae462 commit b9555ef
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions application/models/Response.php
Expand Up @@ -36,6 +36,15 @@ public static function create($surveyId, $scenario = 'insert')
return parent::create($surveyId, $scenario);
}

/** @inheritdoc
* Must be set by DB, adding by security here
* @see https://bugs.limesurvey.org/view.php?id=17208
**/
public function primaryKey()
{
return 'id';
}

/**
* Get all files related to this response and (optionally) question ID.
*
Expand Down

0 comments on commit b9555ef

Please sign in to comment.