From bf7fb570a544fbbec9e54cdeea9fc2cbd649b442 Mon Sep 17 00:00:00 2001 From: Jonas Raoni Soares da Silva Date: Wed, 31 Jul 2024 15:17:07 +0300 Subject: [PATCH] pkp/pkp-lib#10249 Cast object to array --- classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php b/classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php index 8b1feb6f43a..c9952cf085b 100644 --- a/classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php +++ b/classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php @@ -177,7 +177,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; }