-1

I try to open the site to the Bitrix locally, all files and database downloaded, customized configs. but an error:

Fatal error: Call to a member function SetPageProperty() on null in /home/rootname/www/site/site_op/index.php on line 26

$APPLICATION->SetPageProperty("description", "text"); 

class $APPLICATION is NULL.

what could be the problem ?

Community
  • 1
  • 1

1 Answers1

1

$APPLICATION is not a class. It's an instance of CMain and it is global variable.

Obviously you call $APPLICATION inside of a scope of some function. And this function doesn't know about $APPLICATION. In this case add global keyword and use it:

global $APPLICATION;
$APPLICATION->SetPageProperty("description", "text"); 
u_mulder
  • 54,101
  • 5
  • 48
  • 64