From 3ba2e29b1c9ea3364d39b6c63d280ea96276b4e2 Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Wed, 18 Sep 2024 10:42:19 -0700 Subject: [PATCH] pkp/pkp-lib#10445 Fix broken call to substr --- classes/migration/upgrade/PKPv3_3_0UpgradeMigration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.php b/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.php index 3a0fcc92b28..b50efb0dfff 100755 --- a/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.php +++ b/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.php @@ -892,7 +892,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; } }