Skip to content

Commit

Permalink
Correct the error message in case $block is still created but is not…
Browse files Browse the repository at this point in the history
… an AbstractBlock
  • Loading branch information
Hiep Ho Minh committed Aug 31, 2016
1 parent 041b816 commit 47ad2c7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ protected function getBlockInstance($block, array $arguments = [])
}
if (!$block instanceof \Magento\Framework\View\Element\AbstractBlock) {
throw new \Magento\Framework\Exception\LocalizedException(
new \Magento\Framework\Phrase('Invalid block type: %1', [$block]),
new \Magento\Framework\Phrase('Invalid block type: %1', [is_object($block) ? get_class($block) : (string) $block]),
$e
);
}
Expand Down

0 comments on commit 47ad2c7

Please sign in to comment.