警告:Wordpress 中的非法字符串偏移'instance'



我正试图通过ftp更新wordpress网站的php版本。我已经下载并上传了新版wordpress和使用的插件。但如果我现在去网站,我会得到以下错误:

警告:第1073行上/home/e-fashionshoots.com/public_html/wp-content/plugins/theme-my-login/includes/class-theme-my-login.php中的非法字符串偏移量"instance">

警告:第1077行上/home/e-fashionshoots.com/public_html/wp-content/plugins/theme-my-login/includes/class-theme-my-login.php中的非法字符串偏移量"instance">

有人能帮我吗?这是插件代码中的无问题规则:

/**
* Instantiates an instance
*
* @since 6.3
* @access public
*
* @param array|string $args Array or query string of arguments
* @return object Instance object
*/
public function load_instance( $args = '' ) {
$args['instance'] = count( $this->loaded_instances );
$instance = new Theme_My_Login_Template( $args );
if ( $args['instance'] == $this->request_instance ) {
$instance->set_active();
$instance->set_option( 'default_action', $this->request_action );
}
$this->loaded_instances[] = $instance;
return $instance;
}

只需更改插件/theme-my-login/includes/class-theme-my-login.php 中的args默认值

来自字符串

public function load_instance( $args = '' ) {

阵列

public function load_instance( $args = [] ) {

相关内容

最新更新