gpt4 book ai didi

php - phpMyAdmin DisplayResults.php#1226中的错误

转载 作者:行者123 更新时间:2023-12-03 09:54:38 25 4
gpt4 key购买 nike

IAM试图显示phpmyadmin中的所有记录,phpmyadmin给出警告
当我尝试在PHPMyAdmin上访问数据库中的表时,似乎全部使PHPMyAdmin崩溃。

我无法在线找到解决方案,请寻求您的帮助

我有一个我无法解决的问题,错误。./libraries/DisplayResults.php#1226 中的通知

    Notice in ./libraries/DisplayResults.php#1226
Trying to access array offset on value of type bool

Backtrace

./libraries/DisplayResults.php#1346: PMA\libraries\DisplayResults->_getTableHeadersForColumns(
array,
array,
array,
array,
array,
boolean false,
string 'SELECT * FROM `wp_options` ',
)
./libraries/DisplayResults.php#4424: PMA\libraries\DisplayResults->_getTableHeaders(
array,
array,
string 'SELECT * FROM `wp_options` ',
array,
array,
array,
boolean false,
)
./libraries/sql.lib.php#1686: PMA\libraries\DisplayResults->getTable(
,
array,
array,
boolean false,
)
./libraries/sql.lib.php#1980: PMA_getHtmlForSqlQueryResultsTable(
,
string './themes/pmahomme/img/',
NULL,
array,
boolean true,
string '137',
integer 25,
NULL,
,
array,
)
./libraries/sql.lib.php#2199: PMA_getQueryResponseForResultsReturned(
,
array,
string 'dbcc',
string 'wp_options',
NULL,
NULL,
,
string './themes/pmahomme/img/',
string '137',
integer 25,
NULL,
NULL,
NULL,
NULL,
NULL,
string 'SELECT * FROM `wp_options`',
NULL,
)
./libraries/sql.lib.php#2062: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'dbcc',
string 'wp_options',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `wp_options`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'dbcc',
string 'wp_options',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `wp_options`',
NULL,
NULL,
)

最佳答案

我解决了这个
在我的代码中,在1233行中包含:

list($order_link, $sorted_header_html)
= $this->_getOrderLinkAndSortedHeaderHtml(
$fields_meta[$i], $sort_expression,
$sort_expression_nodirection, $i, $unsorted_sql_query,
$session_max_rows, $comments,
$sort_direction, $col_visib,
$col_visib[$j]
);
我插入了一个新的“isset”验证,例如:
$check = (isset($col_visib[$j])) ? $col_visib[$j] : false;
但是在条件下使用..
list($order_link, $sorted_header_html)
= $this->_getOrderLinkAndSortedHeaderHtml(
$fields_meta[$i], $sort_expression,
$sort_expression_nodirection, $i, $unsorted_sql_query,
$session_max_rows, $comments,
$sort_direction, $col_visib,
isset($col_visib[$j]) ? $col_visib[$j] : false
);
@编辑
使用高于7.2的php。我们可以改变
isset($col_visib[$j]) ? $col_visib[$j] : false
为了
col_visib[$j] ?? false
然后..
list($order_link, $sorted_header_html)
= $this->_getOrderLinkAndSortedHeaderHtml(
$fields_meta[$i], $sort_expression,
$sort_expression_nodirection, $i, $unsorted_sql_query,
$session_max_rows, $comments,
$sort_direction, $col_visib,
$col_visib[$j] ?? false
);

关于php - phpMyAdmin DisplayResults.php#1226中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59038483/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com