File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,11 +125,13 @@ private function generateCertificate(
125125 array $ properties = [],
126126 ): AEngineHandler {
127127 $ names = [];
128- foreach ($ rootCert ['names ' ] as $ item ) {
129- if (empty ($ item ['id ' ])) {
130- throw new LibresignException ('Parameter id is required! ' , 400 );
128+ if (isset ($ rootCert ['names ' ])) {
129+ foreach ($ rootCert ['names ' ] as $ item ) {
130+ if (empty ($ item ['id ' ])) {
131+ throw new LibresignException ('Parameter id is required! ' , 400 );
132+ }
133+ $ names [$ item ['id ' ]]['value ' ] = $ this ->trimAndThrowIfEmpty ($ item ['id ' ], $ item ['value ' ]);
131134 }
132- $ names [$ item ['id ' ]]['value ' ] = $ this ->trimAndThrowIfEmpty ($ item ['id ' ], $ item ['value ' ]);
133135 }
134136 $ this ->installService ->generate (
135137 $ this ->trimAndThrowIfEmpty ('commonName ' , $ rootCert ['commonName ' ]),
You can’t perform that action at this time.
0 commit comments