I have coded is_front_page in a similar way like Wordpress Codex. When I check it is noticed also inside URL: https://stackoverflow.com/questions/48236765/undefined-constant-error-in-php-7-2/48236808
It is all inside brackets but do not know why it throws a warning.
What should be modified to avoid a warning
error code Use of undefined constant this will throw an Error in a future version of PHP
Code is the following inside PHP file (Smarty design framework):
$level_page = (in_array($base_url, array( '', '/', '/index.php')) ? 'is_home' : 'is_front_page');
if($level_page == is_front_page){$smarty->assign("level_page", "is_front_page");} else {$smarty->assign("level_page", "is_home");}