diff --git a/classes/migration/upgrade/OMPv3_3_0UpgradeMigration.inc.php b/classes/migration/upgrade/OMPv3_3_0UpgradeMigration.inc.php index 0a4ec4ba042..b4129ab0921 100644 --- a/classes/migration/upgrade/OMPv3_3_0UpgradeMigration.inc.php +++ b/classes/migration/upgrade/OMPv3_3_0UpgradeMigration.inc.php @@ -180,7 +180,7 @@ private function _toJSON($row, $tableName, $searchBy, $valueToConvert) { } if (!count($primaryKeys)) { - foreach (array_keys($row) as $column) { + foreach (array_keys(get_object_vars($row)) as $column) { if (substr($column, -3, '_id')) { $primaryKeys[] = $column; }