In my observer for core_layout_block_create_after
I am checking
public function addButtonBlock($observer)
{
$block = $observer->getEvent()->getBlock();
if (($block->getAction()->getFullActionName() == 'catalog_product_view') && ($block->getNameInLayout() == 'product.info')) {
}}
It's working fine on Product View page , while on review list page with the form its giving an error
PHP Fatal error: Call to a member function getFullActionName() on string in /var/www/html/meemee/app/code/community/Tebet/SocialShare/Model/Observer.php on line 15, referer: http://localhost/meemee/asd.html
I am able to get an echo for review_product_list for $block->getAction()->getFullActionName()
but while using it in if condition it throws error