Skip to content

Commit

Permalink
AC-9027::get_class(): Argument #1 () must be of type object, string g…
Browse files Browse the repository at this point in the history
…iven in magento/framework/Setup/Patch/PatchApplier
  • Loading branch information
ashishkumarpundeer authored and ashishkumarpundeer committed Oct 4, 2023
1 parent 7f58418 commit 732c099
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/internal/Magento/Framework/Setup/Patch/PatchApplier.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ public function applySchemaPatch($moduleName = null)
continue;
}
/**
* @var SchemaPatchInterface $schemaPatch
* @var SchemaPatchInterface $schemaPatchObject
*/
$schemaPatch = $this->patchFactory->create($schemaPatch, ['schemaSetup' => $this->schemaSetup]);
$schemaPatch->apply();
$this->patchHistory->fixPatch(get_class($schemaPatch));
foreach ($schemaPatch->getAliases() as $patchAlias) {
$schemaPatchObject = $this->patchFactory->create($schemaPatch, ['schemaSetup' => $this->schemaSetup]);
$schemaPatchObject->apply();
$this->patchHistory->fixPatch(get_class($schemaPatchObject));
foreach ($schemaPatchObject->getAliases() as $patchAlias) {
if (!$this->patchHistory->isApplied($patchAlias)) {
$this->patchHistory->fixPatch($patchAlias);
}
Expand All @@ -252,7 +252,7 @@ public function applySchemaPatch($moduleName = null)
new Phrase(
'Unable to apply patch %1 for module %2. Original exception message: %3',
[
get_class($schemaPatch),
$schemaPatch,
$moduleName,
$e->getMessage()
]
Expand Down

0 comments on commit 732c099

Please sign in to comment.