M
M
MaxKondratenko2017-04-14 06:43:35
1C-Bitrix
MaxKondratenko, 2017-04-14 06:43:35

Errors when moving to another hosting 1s bitrix, php 7?

Site on 1s Bitrix, I had to move to another hosting.
Mistakes appeared after the move. On the old hosting it worked on php 7, after moving to php 5.6 there are no errors, but if we turn on php 7, after authorization of the store manager (who can only process orders), the following error appears: An error occurred when executing the script: "Enable extended error output in settings file .settings.php", naturally include it in .settings,php 'debug' => trueand see the following error:

[Error] 
Using $this when not in object context (0)
/home/a/antonprk/pampersok.ru/public_html/bitrix/modules/main/classes/mysql/database_mysqli.php:71
#0: CDatabase::ForSql(string)
  /home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccess.php:1013
#1: CLearnAccess::EscapeAndAddLateralQuotes(string)
  
#2: array_map(array, array)
  /home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccess.php:1003
#3: CLearnAccess::Array2CommaSeparatedListForSQL(array)
  /home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccess.php:829
#4: CLearnAccess->GetBitmaskOperationsForAllLessons(array)
  /home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccess.php:401
#5: CLearnAccess->IsBaseAccess(integer)
  /home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/classes/general/clearnaccessmacroses.php:484
#6: CLearnAccessMacroses::CanViewAdminMenu()
  /home/a/antonprk/pampersok.ru/public_html/bitrix/modules/learning/admin/menu.php:276
#7: include(string)
  /home/a/antonprk/pampersok.ru/public_html/bitrix/modules/main/interface/admin_lib.php:640
#8: CAdminMenu->_IncludeMenu(string)
  /home/a/antonprk/pampersok.ru/public_html/bitrix/modules/main/interface/admin_lib.php:418
#9: CAdminMenu->Init(array)
  /home/a/antonprk/pampersok.ru/public_html/bitrix/modules/main/interface/desktop.php:6
#10: require(string)
  /home/a/antonprk/pampersok.ru/public_html/bitrix/admin/index.php:2

ps: From the first time it sometimes enters the admin panel, but if you try to enter the second time, this error appears
pps: The "super" administrator (without restrictions) does not have such errors....

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2017-04-14
@rpsv

Bitrix version what: 10?
On versions 16+ it works fine with 7.0.
Version 7.1 works with jambs, but according to the TP on version 17 everything is ok.
And this error is a call to `$this` in a static method.

O
OnYourLips, 2017-04-14
@OnYourLips

A gross error in the code, $this was used in a static method (this has always been highly discouraged, and is no longer possible in new versions of PHP).
Update your Bitrix, preferably with alternatives.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question