WordPress.org

Ready to get started?Download WordPress

Forums

Add Multiple Users for WordPress
[PATCH] Lots of undefined variable fixes (3 posts)

  1. flynsarmy
    Member
    Posted 10 months ago #

    With WP_DEBUG turned on this module prints out alot of warnings. Fixes below.

    Notice: Trying to get property of non-object in /path/to/wp-content/plugins/add-multiple-users/functions/settings.php on line 289-301

    In the above file change the given lines from

    if($setting->

    to

    if(is_object($setting) && $setting->

    Strict standards: Only variables should be passed by reference in /path/to/wp-content/plugins/add-multiple-users/functions/csvimport.php on line 152

    Change

    $allowedExtensions = array("txt","TXT","csv","CSV");
    if (!in_array(end(explode(".", strtolower($_FILES['csvuploader']['name']))), $allowedExtensions)) {

    to

    $fileExtension = explode(".", strtolower($_FILES['csvuploader']['name']));
    $fileExtension = end($fileExtension);
    if (!in_array($fileExtension, $allowedExtensions)) {

    Notice: Undefined variable: classes in /path/to/wp-content/plugins/add-multiple-users/functions/commonfn.php on line 127,131

    Change

    $classes == '';

    to

    $classes = '';

    Notice: Undefined property: amuUserObject::$user_url in /path/to/wp-content/plugins/add-multiple-users/functions/commonfn.php on line 363

    Change

    if($this->user_url && $this->user_url !== '') {

    to

    if($this->user_url && !empty($this->user_url) && $this->user_url !== '') {

    Notice: Undefined property: amuUserObject::$user_registered in /path/to/wp-content/plugins/add-multiple-users/functions/commonfn.php on line 366

    Change

    if($this->user_registered && $this->user_registered !== '') {

    to

    if($this->user_registered && !empty($this->user_registered) && $this->user_registered !== '') {

    Notice: Undefined property: amuUserObject::$user_nicename in /path/to/wp-content/plugins/add-multiple-users/functions/commonfn.php on line 369

    Change

    if($this->user_nicename && $this->user_nicename !== '') {

    to

    if($this->user_nicename && !empty($this->user_nicename) && $this->user_nicename !== '') {

    Notice: Undefined property: amuUserObject::$display_name in /path/to/wp-content/plugins/add-multiple-users/functions/commonfn.php on line 372

    Change

    if($this->display_name && $this->display_name !== '') {

    to

    if($this->display_name && !empty($this->display_name) && $this->display_name !== '') {

    http://wordpress.org/plugins/add-multiple-users/

  2. Lara Marks
    Member
    Posted 9 months ago #

    Thank you very much for posting this. I hope that the plugin author will implement it in the next update.

  3. stuudio
    Member
    Posted 6 months ago #

    flynsarmy, good job.
    Maybe you can take this plugin and fork it?

    Last Updated: 2012-8-31
    Looks like this plugin has been abandoned.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.