From a5c7b3e3f378698874931be50e5adb54a7310272 Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Wed, 18 Sep 2024 10:40:56 -0700 Subject: [PATCH] pkp/pkp-lib#10445 Fix broken call to substr --- 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 c9952cf085b..b0164df3157 100644 --- a/classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php +++ b/classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php @@ -178,7 +178,7 @@ private function _toJSON($row, $tableName, $searchBy, $valueToConvert) if (!count($primaryKeys)) { foreach (array_keys(get_object_vars($row)) as $column) { - if (substr($column, -3, '_id')) { + if (substr($column, -3) == '_id') { $primaryKeys[] = $column; } }