[MDEV-14973] PHP 7.2 count() - SYNTAX error in sql.lib.php Created: 2018-01-17  Updated: 2018-02-28  Resolved: 2018-02-28

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.3.3
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Thomas Hughes Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: need_feedback
Environment:

Ubuntu 16.04, PHP 7.2.1



 Description   

When accessing phpMyAdmin I get the following error:

Warning in ./libraries/sql.lib.php#601
count(): Parameter must be an array or an object that implements Countable

Backtrace

./libraries/sql.lib.php#2038: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#1984: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'holding',
string 'users',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `users`',
NULL,
NULL,
)
./sql.php#216: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'holding',
string 'users',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `users`',
NULL,
NULL,
)

This is fixed by editing file ./libraries/sql.lib.php line 601.
Replace: || (count($analyzed_sql_results['select_expr'] == 1)
With: || (count($analyzed_sql_results['select_expr']) == 1



 Comments   
Comment by Elena Stepanova [ 2018-01-23 ]

Shouldn't it be a report for phpMyAdmin?

Generated at Thu Feb 08 08:17:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.