Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
stdClass wordpress插件错误_Wordpress - Fatal编程技术网

stdClass wordpress插件错误

stdClass wordpress插件错误,wordpress,Wordpress,当我访问wordpress dashbord安装新插件时,会出现如上所述的错误 stdClass::$plugin in/var/sentora/hostdata/websitenligne/public_html/sme2/wp includes/class-wp-list-util.php,第150行 公共函数pull($field,$index\u key=null){ 如果(!$index\u键){ /* *这很简单。可以在某个点包装数组_列() *如果我们知道我们有一个数组。 */

当我访问wordpress dashbord安装新插件时,会出现如上所述的错误

stdClass::$plugin in/var/sentora/hostdata/websitenligne/public_html/sme2/wp includes/class-wp-list-util.php,第150行

公共函数pull($field,$index\u key=null){
如果(!$index\u键){
/*
*这很简单。可以在某个点包装数组_列()
*如果我们知道我们有一个数组。
*/
foreach($this->output as$key=>$value){
如果(是对象($value)){
$this->output[$key]=$value->$field;
}否则{
$this->output[$key]=$value[$field];
}
}
返回$this->output;
}
/*
*当未为特定项设置索引键时,按下该值
*这是数组_column()的行为方式。
*/
$newlist=array();
foreach($this->输出为$value){
如果(是对象($value)){
如果(isset($value->$index_key)){
$newlist[$value->$index\u key]=$value->$field;
}否则{
$newlist[]=$value->$field;
}
}否则{
如果(isset($value[$index\u key])){
$newlist[$value[$index_key]]=$value[$field];
}否则{
$newlist[]=$value[$field];
}
}
}
$this->output=$newlist;
返回$this->output;

}
尝试通过以下方式更新您的wordpress:Dashboard->update
如果您有最新版本,请尝试重新安装,您的问题将得到解决。

请尝试通过以下方式更新您的wordpress:Dashboard->update
如果您有最新版本,请尝试重新安装,您的问题将得到解决

请尝试更新所有可用的插件。这解决了我的问题。

尝试更新所有可用的插件。这解决了我的问题。

这个问题似乎是第一个问题,原因是
wp includes/class wp list util.php
没有检查是否设置了对象属性

在WordPress 5.2.1(最新发布时间)中看起来是这样的。第152行应该类似于:

$this->output[$key]=isset($value->$field)$值->$字段:空;
无论如何…要删除此警告,请编辑您的
wp config.php
并更改:

define('WP_DEBUG',true);
…对此(或注释掉
WP\u DEBUG
行):

define('WP_DEBUG',false);
或者,如果希望保持启用状态,但将其输出限制为
wp content/debug.log
,则可以添加以下内容:

define('WP\u DEBUG\u LOG',true);
定义('WP_DEBUG_DISPLAY',false);
  • (尤其是在生产环境中或任何可公开访问的站点(如QA/staging)上不应启用,除非您知道自己在做什么(否则可能会泄露敏感信息)

此问题似乎是第一个问题,原因是
wp includes/class wp list util.php
未检查是否设置了对象属性

在WordPress 5.2.1(最新发布时间)中看起来是这样的。第152行应该类似于:

$this->output[$key]=isset($value->$field)?$value->$field:null;
无论如何…要删除此警告,请编辑您的
wp config.php
并更改:

define('WP_DEBUG',true);
…对此(或注释掉
WP\u DEBUG
行):

define('WP_DEBUG',false);
或者,如果希望保持启用状态,但将其输出限制为
wp content/debug.log
,则可以添加以下内容:

define('WP\u DEBUG\u LOG',true);
定义('WP_DEBUG_DISPLAY',false);
  • (尤其是在生产环境中或任何可公开访问的站点(如QA/staging)上不应启用,除非您知道自己在做什么(否则可能会泄露敏感信息)

    • 这篇文章给了我一些很好的例子来解决这个问题 你能找到巫婆插件导致问题的方法是把这个代码放在那个函数上,用插件来屏蔽问题,结果是有效的空的:1如果插件导致问题

      public function pluck( $field, $index_key = null ) {
                  $newlist = array();
      
                  if ( ! $index_key ) {
                      /*
                       * This is simple. Could at some point wrap array_column()
                       * if we knew we had an array of arrays.
                       */
                      foreach ( $this->output as $key => $value ) {
                          if ( is_object( $value ) ) {
                         //this code to ouput the plugin that causing the problem 
                              echo('<div style="margin-left: 251px;">' );
                              echo('<p>is object</p>' );
                              echo('<h2 style="margin-left: 400px;">'.(string)  $key."</h2> 
                              <br/>" );
                              echo('<h2 style="margin-left: 251px;"> field:'. $field."</h2> 
                              <br/>" );
      
                              echo('<h2 style="margin-left: 251px;"> 
                               isvalidEmpty:'.empty($value->$field)."</h2><br/>" );
                              echo('</div>' );
      
      公共函数pull($field,$index\u key=null){
      $newlist=array();
      如果(!$index\u键){
      /*
      *这很简单。可以在某个点包装数组_列()
      *如果我们知道我们有一个数组。
      */
      foreach($this->output as$key=>$value){
      如果(是对象($value)){
      //此代码用于输出导致问题的插件
      回声(“”);
      回声(“是对象”

      ); echo(“”。(字符串)$key。“
      ; 回显('field:'.$field。“
      ; 回声(' isvalidEmpty:'.empty($value->$field)。“
      ”; 回声(“”);
      这篇文章给了我一些解决问题的好例子 你能找到巫婆插件导致问题的方法是把这个代码放在那个函数上,用插件来屏蔽问题,结果是有效的空的:1如果插件导致问题

      public function pluck( $field, $index_key = null ) {
                  $newlist = array();
      
                  if ( ! $index_key ) {
                      /*
                       * This is simple. Could at some point wrap array_column()
                       * if we knew we had an array of arrays.
                       */
                      foreach ( $this->output as $key => $value ) {
                          if ( is_object( $value ) ) {
                         //this code to ouput the plugin that causing the problem 
                              echo('<div style="margin-left: 251px;">' );
                              echo('<p>is object</p>' );
                              echo('<h2 style="margin-left: 400px;">'.(string)  $key."</h2> 
                              <br/>" );
                              echo('<h2 style="margin-left: 251px;"> field:'. $field."</h2> 
                              <br/>" );
      
                              echo('<h2 style="margin-left: 251px;"> 
                               isvalidEmpty:'.empty($value->$field)."</h2><br/>" );
                              echo('</div>' );
      
      公共函数pull($field,$index\u key=null){
      $newlist=array();
      如果(!$index\u键){
      /*
      *这很简单。可以在某个点包装数组_列()
      *如果我们知道我们有一个数组。
      */
      foreach($this->output as$key=>$value){
      如果(是对象($value)){
      //此代码用于输出导致问题的插件
      回声(“”);
      回声(“是对象”

      );