尝试在我的 Xampp Apache 服务器上安装最新的 Invision 电源板时,我收到此错误:
Fatal error: Cannot make static method XMLReader::open() non static in class IPS\Xml\_XMLReader in D:\xampp\htdocs\PATH_TO_IPS_INSTALL\system\Xml\XMLReader.php on line 34
这是我的 PHP.ini 的扩展部分的摘录
extension=bz2
extension=curl
extension=ffi
extension=ftp
extension=fileinfo
extension=gd
extension=gettext
extension=gmp
extension=intl
extension=imap
extension=ldap
extension=mbstring
extension=exif
extension=mysqli
extension=oci8_12c
extension=odbc
extension=openssl
extension=pdo_firebird
extension=pdo_mysql
extension=pdo_oci
extension=pdo_odbc
extension=pdo_pgsql
extension=pdo_sqlite
extension=pgsql
extension=shmop
extension=soap
extension=sockets
extension=sodium
extension=sqlite3
extension=tidy
extension=xsl
我该怎么做才能摆脱错误?
编辑:这是从第 23 行开始的内容
class _XMLReader extends \XMLReader
{
/**
* Open a file or URL with XMLReader to read it
*
* @param string $uri The URI/path to open
* @param string $encoding The encoding to use, or NULL
* @param int $options Bitmask of LIBXML_* constants
* @return bool
* @note We are disabling network access while loading the content to prevent XXE
*/
public function open( $uri, $encoding=NULL, $options=0 )
{
if( $options === 0 )
{
$options = LIBXML_NONET;
}
return parent::open( $uri, $encoding, $options );
}
}