afragen / wordpress-beta-tester

WordPress Beta Tester plugin

Home Page:https://wordpress.org/plugins/wordpress-beta-tester/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined property notice when using SQLite

ironprogrammer opened this issue · comments

When running WordPress on SQLite, the following notice is logged when viewing the "Report a Bug" tab:

Notice: Undefined property: WP_SQLite_DB\PDOEngine::$client_info in ../WPBT_Bug_Report.php on line 282

The output for the bug template reflects the following database info:

- Database: WP_SQLite_DB\PDOEngine (Server: 5.5 / Client: )

(I haven't tested this with the "official" SQLite canonical plugin, but it's based on the same code as linked above.)

Tested using WPBT 3.3.6.

thanx for the report. Can you please check what Site Health displays in it's Info > Database section?

@ironprogrammer Thanks for the report! Can you also check the value of PDO::ATTR_SERVER_VERSION and PDO::ATTR_CLIENT_VERSION and let us know what they show? Ref

var_dump( $db->getAttribute( PDO::ATTR_SERVER_VERSION ) );
var_dump( $db->getAttribute( PDO::ATTR_CLIENT_VERSION ) );

In Site Health:

  • Extension: WP_SQLite_DB\PDOEngine
  • Server version: 5.5
  • Client version: (blank)

In Slack @costdev provided a snippet for retrieving the constants mentioned above, which also fixed the output on the "Report a Bug" template:

  • Server: 3.41.0
  • Client: 3.41.0

Yielding:

- Database: WP_SQLite_DB\PDOEngine (Server: 3.41.0 / Client: 3.41.0)