From 26d2001553cdf828718eaa2cf9eca8e1472ca7e5 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 4b108474946..43116c4adb9 100755 --- a/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.php +++ b/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.php @@ -882,7 +882,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; } }