Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Проблема с переходом на PHP 8

Featured Replies

Posted

Привет,

Я делаю свое собственное приложение.
Теперь я изменил версию PHP 8, и мне нужно адаптировать свой код к этой версии. В папке /sources в приложении у меня есть файл, определяющий названия отдельных элементов, например 0=>Original , 2=> Fake
В php-коде модуля я загружаю этот файл через код:

$actorstype = \IPS\gamecp\Game::loadActorsType();

$actorstype = \IPS\gamecp\Game::loadActorsType();

Однако в файле w/sources у меня что-то вроде этого:
 

public static function loadActorsType ()
{
        return array(
						0 => 'Regular Actor',
						1 => 'Actor Rybak',
                        2 => 'Actor Lumberjack',
                        3 => 'Actor Dealer Weapons',
                        4 => 'Heist actor',
                        5 => 'Actor to the store 24/7',
                        6 => 'Actor for office',
                        7 => 'Actor to the employment office',
                        8 => 'Actor for business',
                        9 => 'Actor to bank',
		);
}


При изменении php на 8.0 я получаю сообщение об ошибке:

Whoops \ Exception \ ErrorException (E_USER_ERROR)
You do not have any methods in IPS\gamecp\Game which are not static. Please refactor. (PHP Coding Standards: Functions and Methods.6)

Как я могу изменить его на новую версию?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.