Skip to content

Commit

Permalink
pkp/pkp-lib#10249 Cast object to array
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jul 31, 2024
1 parent f13d199 commit 4d10f67
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4d10f67

Please sign in to comment.