I get this notice on my site and I know it is probably some simple fix..

我在我的网站上收到此通知,我知道这可能是一些简单的解决方案..

Notice: Undefined variable: after_widget in ....wp-content/plugins/wps-pro-login/includes/class-wps-pro-login-widget.php on line 200

注意:未定义的变量:在第200行的.... wp-content / plugins / wps-pro-login / includes / class-wps-pro-login-widget.php中的after_widget

here is the code starting on line 199:

这是从第199行开始的代码:

        //echo $args['after_widget'];
            echo $after_widget;

}

// Update the widget settings.
public function update( $new_instance, $old_instance ) {
    $instance['title'] = strip_tags( stripslashes($new_instance['title']) );
    $instance['avtar_size'] =  strip_tags( stripslashes($new_instance['avtar_size']) );

1 个解决方案

#1


You try to work with variable which doesn't exist. Use isset to check it.

您尝试使用不存在的变量。使用isset进行检查。

if (isset($after_widget)) {
    echo $after_widget;
}

OR

echo isset($after_widget) ? $after_widget : '';

更多相关文章

  1. 使用PHP查询db,通过AJAX获取结果作为变量,再次使用初始变量的值查
  2. (T_ENCAPSED_AND_WHITESPACE),期望标识符(T_STRING)或变量(T_VARI
  3. php static静态变量及方法详解
  4. PHP XAMPP配置PHP环境和Apache80端口被占用解决方案
  5. 如何将结果输入变量MYSQL
  6. thinkphp环境变量.env配置
  7. smarty模板引擎变量的传递方法
  8. PHP会话变量没有转移到我登录的页面,但是会话ID是
  9. php变量函数,回调函数

随机推荐

  1. Android图片太大导致无法正常显示
  2. Android(安卓)NDK学习(2)Windows下NDK开发
  3. android ellipsize的使用
  4. 【Android】xml文件里面出现unbound pref
  5. Android EditText身份证等类型
  6. Android JNI简单实例(android 调用C/C++代
  7. android 开机启动桌面Activity(Launcher )
  8. android:shape的使用
  9. Android(安卓)SQLite数据库增删改查操作
  10. 《Android面试宝典》学习笔记(第二章:布局)