LoginSignup
2
1

More than 3 years have passed since last update.

phpMyAdmin 4.6.6 のWarning対処

Last updated at Posted at 2021-01-24

同じような環境を何度も構築しては、phpMyAdminから警告がでるので、いい加減まとめる。
最新をソースからinstallすればいいんだけど、aptに慣れた体にはマジ無理・・。

環境

  • Ubuntu 18.04.5 LTS (Bionic Beaver)
  • Apache 2.4.29
  • MySQL 5.7.32-0ubuntu0.18.04.1 - (Ubuntu)
  • PHP 7.2.24-0ubuntu0.18.04.7
  • phpMyAdmin 4.6.6deb5ubuntu0.5

インポート/エクスポート回り2箇所でWarningがでるので対処。

Warning in ./libraries/plugin_interface.lib.php#551


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

php7.2から、count(null)に対して0ではなく、warningを返すようになったため。
/usr/hsare/phpmyadmin/libraries/plugin_interface.lib.php の551行目あたり

/usr/share/phpmyadmin/libraries/plugin_interface.lib.php
if ($options != null && count($options) > 0) {

を、

/usr/share/phpmyadmin/libraries/plugin_interface.lib.php
if ($options != null && count((array)$options) > 0) {

に修正。もう一箇所は、、

Warning in ./libraries/sql.lib.php#613

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

/usr/share/phpmyadmin/libraries/sql.lib.phpの、613行目あたり。

/usr/share/phpmyadmin/libraries/sql.lib.php
  || (count($analyzed_sql_results['select_expr'] == 1)

を、

/usr/share/phpmyadmin/libraries/sql.lib.php
|| ((count($analyzed_sql_results['select_expr']) == 1)

参考(ありがとう)

2
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1