From e0ab70bec6a9ddbe9f4a49565ae1aad950f63dd8 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Wed, 3 Dec 2025 14:04:53 -0300 Subject: [PATCH] fix: ensure organizationalUnit is converted before engine initialization The migration was failing during upgrade to stable32 because it tried to set organizationalUnit as a string when the property expects an array. The issue occurred because addConfigPathToOpenSsl() (which calls getEngine() and triggers populateInstance()) was executed before convertRootCertOuStringToArray(). This fix reorders the method calls in preSchemaChange() to convert the OU value to an array before initializing the engine, preventing the TypeError. Fixes the error: TypeError: Cannot assign string to property OCA\Libresign\Handler\CertificateEngine\AEngineHandler::$organizationalUnit of type array Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- lib/Migration/Version13000Date20251031165700.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Migration/Version13000Date20251031165700.php b/lib/Migration/Version13000Date20251031165700.php index b1637fc6f..b2d01647a 100644 --- a/lib/Migration/Version13000Date20251031165700.php +++ b/lib/Migration/Version13000Date20251031165700.php @@ -52,8 +52,8 @@ class Version13000Date20251031165700 extends SimpleMigrationStep { */ #[Override] public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { - $this->addConfigPathToOpenSsl(); $this->convertRootCertOuStringToArray(); + $this->addConfigPathToOpenSsl(); $this->backupCrlDataToDisk(); }