raviraj
raviraj

Reputation: 131

I have upgrade the php version 7.2 to 7.4 now getting error in myphpadmin panel. i am attaching the screenshort

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

Backtrace

./libraries/DisplayResults.php#1349: PMA\libraries\DisplayResults->_getTableHeadersForColumns(
array,
array,
array,
array,
array,
boolean false,
string 'SELECT * FROM `wp_postmeta` ',
)
./libraries/DisplayResults.php#4427: PMA\libraries\DisplayResults->_getTableHeaders(
array,
array,
string 'SELECT * FROM `wp_postmeta` ',
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 '476770',
integer 25,
NULL,
,
array,
)
./libraries/sql.lib.php#2199: PMA_getQueryResponseForResultsReturned(
,
array,
string 'tren_wp2',
string 'wp_postmeta',
NULL,
NULL,
,
string './themes/pmahomme/img/',
string '476770',
integer 25,
NULL,
NULL,
NULL,
NULL,
NULL,
string 'SELECT * FROM `wp_postmeta`',
NULL,
)
./libraries/sql.lib.php#2062: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'tren_wp2',
string 'wp_postmeta',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `wp_postmeta`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'tren_wp2',
string 'wp_postmeta',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `wp_postmeta`',
NULL,
NULL,
)

enter image description here

Upvotes: 6

Views: 3039

Answers (4)

oleg.kurnyavko
oleg.kurnyavko

Reputation: 1

If you delete the phpMyAdmin cookies in the browser, the error disappears. PHP version: 7.4.1, phpMyAdmin version: 4.9.5

Upvotes: 0

BitDEVil2K16
BitDEVil2K16

Reputation: 324

You can edit the file /usr/share/phpmyadmin/libraries/DisplayResults.php

in the specific line #XXXX Search $col_visib[$j] and add ?? false

$col_visib[$j] ?? false

in your case

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
    );

Ps. On Debian works also

have fun

Upvotes: 11

You need to add the repository and run an upgrade.

Steps

  1. sudo add-apt-repository ppa:phpmyadmin/ppa
  2. sudo apt update
  3. sudo apt upgrade
  4. sudo systemctl restart apache2

Upvotes: 8

raviraj
raviraj

Reputation: 131

I have resolved the issue, whenever you are going to upgrade PHP version 7.2 to 7.4 you must upgrade all module which means PHPMyAdmin, apache et.

Upvotes: 0

Related Questions