File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,10 +70,17 @@ public function setResource(string $resource): self {
7070
7171 public function getArchitectures (): array {
7272 $ appInfo = $ this ->appManager ->getAppInfo (Application::APP_ID );
73- if (empty ($ appInfo ['dependencies ' ]['architecture ' ])) {
73+ $ architectures = $ appInfo ['dependencies ' ]['architecture ' ] ?? null ;
74+ if (empty ($ architectures )) {
7475 throw new \Exception ('dependencies>architecture not found at info.xml ' );
7576 }
76- return $ appInfo ['dependencies ' ]['architecture ' ];
77+ if (is_string ($ architectures )) {
78+ return [$ architectures ];
79+ }
80+ if (!is_array ($ architectures )) {
81+ throw new \Exception ('dependencies>architecture has invalid format at info.xml ' );
82+ }
83+ return array_values (array_map (static fn (mixed $ architecture ): string => (string )$ architecture , $ architectures ));
7784 }
7885
7986 public function setPrivateKey (PrivateKey $ privateKey ): void {
You can’t perform that action at this time.
0 commit comments