如下,数据库报错
Deprecation Notice in .\vendor\twig\twig\lib\Twig\Node.php#198
Unparenthesized \`a ? b : c ? d : e\` is deprecated. Use either \`(a ? b : c) ? d : e\` or \`a ? b : (c ? d : e)\`
大概率为PHP版本过高或者过低,更换版本即可解决。
Deprecation Notice in .\libraries\classes\DatabaseInterface.php#615
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Backtrace
.\vendor\composer\ClassLoader.php#444: include()
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../../libraries/classes\\DatabaseInterface.php')
Composer\Autoload\ClassLoader->loadClass(string 'PhpMyAdmin\\DatabaseInterface')
.\libraries\common.inc.php#314: XzOwTzS3UDOxUJOe(string 'PhpMyAdmin\\DatabaseInterface')
.\tbl_structure.php#14: require_once(.\libraries\common.inc.php)
Deprecation Notice in .\libraries\classes\Url.php#251
Array and string offset access syntax with curly braces is deprecated
Backtrace
.\vendor\composer\ClassLoader.php#444: include()
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../../libraries/classes\\Url.php')
Composer\Autoload\ClassLoader->loadClass(string 'PhpMyAdmin\\Url')
.\libraries\classes\Header.php#231: XzOwTzS3UDOxUJOe(string 'PhpMyAdmin\\Url')
.\libraries\classes\Header.php#282: PhpMyAdmin\Header->getJsParams()
.\libraries\classes\Header.php#214: PhpMyAdmin\Header->getJsParamsCode()
.\libraries\classes\Header.php#142: PhpMyAdmin\Header->_addDefaultScripts()
.\libraries\classes\Response.php#100: PhpMyAdmin\Header->__construct()
.\libraries\classes\Response.php#134: PhpMyAdmin\Response->__construct()
.\libraries\common.inc.php#428: PhpMyAdmin\Response::getInstance()
.\tbl_structure.php#14: require_once(.\libraries\common.inc.php)
Deprecation Notice in .\vendor\twig\twig\lib\Twig\Node.php#42
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Backtrace
.\vendor\composer\ClassLoader.php#444: include()
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\Node.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_Node')
XzOwTzS3UDOxUJOe(string 'Twig_Node')
.\vendor\twig\twig\lib\Twig\Parser.php#415: class_exists(string 'Twig_Node')
.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\lib\Twig\Parser.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\Parser.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_Parser')
XzOwTzS3UDOxUJOe(string 'Twig_Parser')
.\vendor\twig\twig\lib\Twig\TokenParserInterface.php#42: class_exists(string 'Twig_Parser')
.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\lib\Twig\TokenParserInterface.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\TokenParserInterface.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_TokenParserInterface')
.\vendor\twig\twig\lib\Twig\TokenParser.php#17: XzOwTzS3UDOxUJOe(string 'Twig_TokenParserInterface')
.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\lib\Twig\TokenParser.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\TokenParser.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_TokenParser')
.\vendor\twig\twig\lib\Twig\TokenParser\For.php#26: XzOwTzS3UDOxUJOe(string 'Twig_TokenParser')
.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\lib\Twig\TokenParser\For.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\TokenParser\\For.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_TokenParser_For')
.\vendor\twig\twig\lib\Twig\Extension\Core.php#123: XzOwTzS3UDOxUJOe(string 'Twig_TokenParser_For')
.\vendor\twig\twig\lib\Twig\Environment.php#1559: Twig_Extension_Core->getTokenParsers()
.\vendor\twig\twig\lib\Twig\Environment.php#1513: Twig_Environment->initExtension()
.\vendor\twig\twig\lib\Twig\Environment.php#1435: Twig_Environment->initExtensions()
.\vendor\twig\twig\lib\Twig\Lexer.php#385: Twig_Environment->getUnaryOperators()
.\vendor\twig\twig\lib\Twig\Lexer.php#68: Twig_Lexer->getOperatorRegex()
.\vendor\twig\twig\lib\Twig\Environment.php#674: Twig_Lexer->__construct()
.\vendor\twig\twig\lib\Twig\Environment.php#774: Twig_Environment->tokenize()
.\vendor\twig\twig\lib\Twig\Environment.php#452: Twig_Environment->compileSource()
.\vendor\twig\twig\lib\Twig\Environment.php#402: Twig_Environment->loadTemplate(string 'table/structure/display_table_stats.twig')
.\libraries\classes\Template.php#115: Twig_Environment->load(string 'table/structure/display_table_stats.twig')
.\libraries\classes\Controllers\Table\TableStructureController.php#1420: PhpMyAdmin\Template->render(array)
.\libraries\classes\Controllers\Table\TableStructureController.php#1278: PhpMyAdmin\Controllers\Table\TableStructureController->getTableStats()
.\libraries\classes\Controllers\Table\TableStructureController.php#377: PhpMyAdmin\Controllers\Table\TableStructureController->displayStructure(
array,
array,
array,
,
array,
array,
)
.\tbl_structure.php#57: PhpMyAdmin\Controllers\Table\TableStructureController->indexAction()
Deprecation Notice in .\vendor\twig\twig\lib\Twig\Node.php#198
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Backtrace
.\vendor\composer\ClassLoader.php#444: include()
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\Node.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_Node')
XzOwTzS3UDOxUJOe(string 'Twig_Node')
.\vendor\twig\twig\lib\Twig\Parser.php#415: class_exists(string 'Twig_Node')
.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\lib\Twig\Parser.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\Parser.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_Parser')
XzOwTzS3UDOxUJOe(string 'Twig_Parser')
.\vendor\twig\twig\lib\Twig\TokenParserInterface.php#42: class_exists(string 'Twig_Parser')
.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\lib\Twig\TokenParserInterface.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\TokenParserInterface.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_TokenParserInterface')
.\vendor\twig\twig\lib\Twig\TokenParser.php#17: XzOwTzS3UDOxUJOe(string 'Twig_TokenParserInterface')
.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\lib\Twig\TokenParser.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\TokenParser.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_TokenParser')
.\vendor\twig\twig\lib\Twig\TokenParser\For.php#26: XzOwTzS3UDOxUJOe(string 'Twig_TokenParser')
.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\lib\Twig\TokenParser\For.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'D:\\phpstudy_pro\\WWW\\member\\phpMyAdmin4.8.5\\vendor\\composer/../twig/twig/lib\\Twig\\TokenParser\\For.php')
Composer\Autoload\ClassLoader->loadClass(string 'Twig_TokenParser_For')
.\vendor\twig\twig\lib\Twig\Extension\Core.php#123: XzOwTzS3UDOxUJOe(string 'Twig_TokenParser_For')
.\vendor\twig\twig\lib\Twig\Environment.php#1559: Twig_Extension_Core->getTokenParsers()
.\vendor\twig\twig\lib\Twig\Environment.php#1513: Twig_Environment->initExtension()
.\vendor\twig\twig\lib\Twig\Environment.php#1435: Twig_Environment->initExtensions()
.\vendor\twig\twig\lib\Twig\Lexer.php#385: Twig_Environment->getUnaryOperators()
.\vendor\twig\twig\lib\Twig\Lexer.php#68: Twig_Lexer->getOperatorRegex()
.\vendor\twig\twig\lib\Twig\Environment.php#674: Twig_Lexer->__construct()
.\vendor\twig\twig\lib\Twig\Environment.php#774: Twig_Environment->tokenize()
.\vendor\twig\twig\lib\Twig\Environment.php#452: Twig_Environment->compileSource()
.\vendor\twig\twig\lib\Twig\Environment.php#402: Twig_Environment->loadTemplate(string 'table/structure/display_table_stats.twig')
.\libraries\classes\Template.php#115: Twig_Environment->load(string 'table/structure/display_table_stats.twig')
.\libraries\classes\Controllers\Table\TableStructureController.php#1420: PhpMyAdmin\Template->render(array)
.\libraries\classes\Controllers\Table\TableStructureController.php#1278: PhpMyAdmin\Controllers\Table\TableStructureController->getTableStats()
.\libraries\classes\Controllers\Table\TableStructureController.php#377: PhpMyAdmin\Controllers\Table\TableStructureController->displayStructure(
array,
array,
array,
,
array,
array,
)
.\tbl_structure.php#57: PhpMyAdmin\Controllers\Table\TableStructureController->indexAction()
网上方案:
任何老版本可以直接升级mysql8.0,以及php为7.4版本。
修改三个文件:如下
①
1:diy/dayrui/models/Category\_model.php 108行
2:diy/dayrui/models/Category\_model.php 159行
3:diy/dayrui/models/Category\_model.php 216行
4:diy/dayrui/libraries/Dip.php 84行
把所有的{}改为[].
②
1:diy/dayrui/libraries/Template.php 84行
把
!$system[‘order’] && $system[‘order’] = $system[‘flag’] ? ‘updatetime\_desc’ : $action == ‘hits’ ? ‘hits’ : ‘updatetime’; // 默认排序参数
改成
!$system[‘order’] &&($system[‘order’] =$system[‘flag’] ? ‘updatetime\_desc’ : $action) == ‘hits’ ? ‘hits’ : ‘updatetime’; // 默认排序参数
这样就ok,适用所有版本升级为最新最新版本。
暂无评论内容