ZaLinux.ru

Ошибка phpMyAdmin «Deprecation Notice in .\vendor\twig\twig\src\Loader\FilesystemLoader.php#40 realpath(): Passing null to parameter #1 ($path) of type string is deprecated» (РЕШЕНО)

На момент написания последний выпуск phpMyAdmin (5.1) не до конца совместим с последними версиями PHP (8.1.1), поэтому программа выводит следующие уведомления об использовании устаревшего синтаксиса:

Deprecation Notice in .\vendor\twig\twig\src\Loader\FilesystemLoader.php#40
 realpath(): Passing null to parameter #1 ($path) of type string is deprecated

Backtrace

.\vendor\twig\twig\src\Loader\FilesystemLoader.php#40: realpath(NULL)
.\libraries\classes\Template.php#57: Twig\Loader\FilesystemLoader->__construct(string 'C:\\Server\\data\\htdocs\\-phpmyadmin\\\\templates\\')
.\libraries\classes\Theme.php#101: PhpMyAdmin\Template->__construct()
.\libraries\classes\Theme.php#174: PhpMyAdmin\Theme->__construct()
.\libraries\classes\ThemeManager.php#307: PhpMyAdmin\Theme::load(
string './themes/metro',
string 'C:\\Server\\data\\htdocs\\-phpmyadmin\\./themes/metro/',
)
.\libraries\classes\ThemeManager.php#79: PhpMyAdmin\ThemeManager->loadThemes()
.\libraries\classes\ThemeManager.php#121: PhpMyAdmin\ThemeManager->__construct()
.\libraries\classes\ThemeManager.php#385: PhpMyAdmin\ThemeManager::getInstance()
.\libraries\common.inc.php#240: PhpMyAdmin\ThemeManager::initializeTheme()
.\index.php#15: require_once(.\libraries\common.inc.php)
Deprecation Notice in .\vendor\twig\twig\src\Markup.php#35
 Return type of Twig\Markup::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Backtrace

.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\src\Markup.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'C:\\Server\\data\\htdocs\\-phpmyadmin\\vendor\\composer/../twig/twig/src/Markup.php')
.\tmp\twig\46\46f1bfbf4328d3d22fddffb9178fdeb9868d0740e4cc8b5bbd6f2fcfb8e4523e.php#59: Composer\Autoload\ClassLoader->loadClass(string 'Twig\\Markup')
.\vendor\twig\twig\src\Template.php#405: __TwigTemplate_034511bee5325c368ee003e3d97d6cb47c3e1c94ebb527bcf0b76ba7818d1ac6->doDisplay(
array,
array,
)
.\vendor\twig\twig\src\Template.php#378: Twig\Template->displayWithErrorHandling(
array,
array,
)
.\vendor\twig\twig\src\Template.php#390: Twig\Template->display(array)
.\vendor\twig\twig\src\TemplateWrapper.php#45: Twig\Template->render(
array,
array,
)
.\libraries\classes\Template.php#132: Twig\TemplateWrapper->render(array)
.\libraries\classes\Header.php#714: PhpMyAdmin\Template->render(
string 'javascript/variables',
array,
)
.\libraries\classes\Header.php#193: PhpMyAdmin\Header->getVariablesForJavaScript()
.\libraries\classes\Header.php#142: PhpMyAdmin\Header->addDefaultScripts()
.\libraries\classes\Response.php#184: PhpMyAdmin\Header->__construct()
.\libraries\classes\Response.php#215: PhpMyAdmin\Response->__construct()
.\libraries\classes\Plugins\Auth\AuthenticationCookie.php#102: PhpMyAdmin\Response::getInstance()
.\libraries\classes\Plugins\AuthenticationPlugin.php#275: PhpMyAdmin\Plugins\Auth\AuthenticationCookie->showLoginForm()
.\libraries\common.inc.php#263: PhpMyAdmin\Plugins\AuthenticationPlugin->authenticate()
.\index.php#15: require_once(.\libraries\common.inc.php)
Deprecation Notice in .\vendor\twig\twig\src\Markup.php#40
 Return type of Twig\Markup::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Backtrace

.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\src\Markup.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'C:\\Server\\data\\htdocs\\-phpmyadmin\\vendor\\composer/../twig/twig/src/Markup.php')
.\tmp\twig\46\46f1bfbf4328d3d22fddffb9178fdeb9868d0740e4cc8b5bbd6f2fcfb8e4523e.php#59: Composer\Autoload\ClassLoader->loadClass(string 'Twig\\Markup')
.\vendor\twig\twig\src\Template.php#405: __TwigTemplate_034511bee5325c368ee003e3d97d6cb47c3e1c94ebb527bcf0b76ba7818d1ac6->doDisplay(
array,
array,
)
.\vendor\twig\twig\src\Template.php#378: Twig\Template->displayWithErrorHandling(
array,
array,
)
.\vendor\twig\twig\src\Template.php#390: Twig\Template->display(array)
.\vendor\twig\twig\src\TemplateWrapper.php#45: Twig\Template->render(
array,
array,
)
.\libraries\classes\Template.php#132: Twig\TemplateWrapper->render(array)
.\libraries\classes\Header.php#714: PhpMyAdmin\Template->render(
string 'javascript/variables',
array,
)
.\libraries\classes\Header.php#193: PhpMyAdmin\Header->getVariablesForJavaScript()
.\libraries\classes\Header.php#142: PhpMyAdmin\Header->addDefaultScripts()
.\libraries\classes\Response.php#184: PhpMyAdmin\Header->__construct()
.\libraries\classes\Response.php#215: PhpMyAdmin\Response->__construct()
.\libraries\classes\Plugins\Auth\AuthenticationCookie.php#102: PhpMyAdmin\Response::getInstance()
.\libraries\classes\Plugins\AuthenticationPlugin.php#275: PhpMyAdmin\Plugins\Auth\AuthenticationCookie->showLoginForm()
.\libraries\common.inc.php#263: PhpMyAdmin\Plugins\AuthenticationPlugin->authenticate()
.\index.php#15: require_once(.\libraries\common.inc.php)

Чтобы эти уведомления перестали появляться, достаточно использовать phpMyAdmin версии 5.2 или более поздней. На данный момент эту версию можно скачать по ссылке https://files.phpmyadmin.net/snapshots/phpMyAdmin-5.2+snapshot-all-languages.zip

Рекомендуемые статьи:

Оставить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *