gcdb::check_database_version()

最后更新于:2021-11-26 08:00:20

gcdb::check_database_version()

Determines whether MySQL database is at least the required minimum version.

响应

(void|GC_Error)

源文件

文件: gc-includes/gc-db.php

	public function check_database_version() {
		global $gc_version, $required_mysql_version;
		// Make sure the server has the required MySQL version.
		if ( version_compare( $this->db_version(), $required_mysql_version, '<' ) ) {
			/* translators: 1: GeChiUI version number, 2: Minimum required MySQL version number. */
			return new GC_Error( 'database_version', sprintf( __( '<strong>Error</strong>: GeChiUI %1$s requires MySQL %2$s or higher' ), $gc_version, $required_mysql_version ) );
		}
	}