Skip to content

Commit

Permalink
#9953 Fix garbling of review form responses on upgrade (stable-3_4_0 …
Browse files Browse the repository at this point in the history
…port) (#9955)
  • Loading branch information
asmecher committed May 9, 2024
1 parent 41fa40f commit 0731eac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/migration/upgrade/PKPv3_3_0UpgradeMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,10 @@ private function _settingsAsJSON()
DB::table($tableName)->where('setting_type', 'object')->get()->each(function ($row) use ($tableName) {
$this->_toJSON($row, $tableName, ['plugin_name', 'context_id', 'setting_name'], 'setting_value');
});
} elseif ($tableName == 'review_form_element_settings') {
DB::table('review_form_element_settings')->where('setting_type', 'object')->get()->each(function ($row) {
$this->_toJSON($row, 'review_form_element_settings', ['setting_name', 'locale', 'review_form_element_id'], 'setting_value');
});
} elseif (Schema::hasColumn($tableName, 'setting_type')) {
try {
$settings = DB::table($tableName, 's')->where('setting_type', 'object')->get(['setting_name', 'setting_value', 's.*']);
Expand Down

0 comments on commit 0731eac

Please sign in to comment.