File tree 1 file changed +7
-6
lines changed
lib/internal/Magento/Framework/Setup/Patch
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -237,22 +237,23 @@ public function applySchemaPatch($moduleName = null)
237
237
continue ;
238
238
}
239
239
/**
240
- * @var SchemaPatchInterface $schemaPatchObject
240
+ * @var SchemaPatchInterface $schemaPatch
241
241
*/
242
- $ schemaPatchObject = $ this ->patchFactory ->create ($ schemaPatch , ['schemaSetup ' => $ this ->schemaSetup ]);
243
- $ schemaPatchObject ->apply ();
244
- $ this ->patchHistory ->fixPatch (get_class ($ schemaPatchObject ));
245
- foreach ($ schemaPatchObject ->getAliases () as $ patchAlias ) {
242
+ $ schemaPatch = $ this ->patchFactory ->create ($ schemaPatch , ['schemaSetup ' => $ this ->schemaSetup ]);
243
+ $ schemaPatch ->apply ();
244
+ $ this ->patchHistory ->fixPatch (get_class ($ schemaPatch ));
245
+ foreach ($ schemaPatch ->getAliases () as $ patchAlias ) {
246
246
if (!$ this ->patchHistory ->isApplied ($ patchAlias )) {
247
247
$ this ->patchHistory ->fixPatch ($ patchAlias );
248
248
}
249
249
}
250
250
} catch (\Exception $ e ) {
251
+ $ schemaPatchClass = is_object ($ schemaPatch ) ? get_class ($ schemaPatch ) : $ schemaPatch ;
251
252
throw new SetupException (
252
253
new Phrase (
253
254
'Unable to apply patch %1 for module %2. Original exception message: %3 ' ,
254
255
[
255
- $ schemaPatch ,
256
+ $ schemaPatchClass ,
256
257
$ moduleName ,
257
258
$ e ->getMessage ()
258
259
]
You can’t perform that action at this time.
0 commit comments