• pha3z

    (@pha3z)


    People who use WP_DEBUG to make sure their code is solid aren’t going to be happy when they see this plugin dumps a hundred NOTICES all over the screen. There are tons of unhandled variables. This is extremely dirty coding practice. It’s going to create a problem for developers who want to use this plugin in DEBUG mode and ensure their code is solid.

    I would suggest taking an initiative to cleanup the unhandled variables and eliminate the NOTICES as you develop this plugin further.

    http://wordpress.org/extend/plugins/download-manager/

Viewing 1 replies (of 1 total)
  • Thread Starter pha3z

    (@pha3z)

    Well I’m going through and fixing these myself so I might as well paste where the changes need to be made.

    download-manager.php
    Before line 321, add this line: if(!isset($_GET[‘task’])) return;

    wpdm-server-file-browser.php
    Before line 4 and line 30, add this line: if(!isset($_GET[‘task’])) return;

    download-manager.php
    Line 156, change to this:
    if(isset($title)) { if($title==’true’) $title = “<h3>”.$data[‘title’].”</h3>”; }

    Line 161, change to this:
    if(isset($desc)) { if($desc==’true’) $desc = wpautop($data[‘description’]).”</br>”; }

    Line 165:
    if(!isset($template) || $template==”) $template = ‘wpdm-only-button’;

    Line 200:
    Improper array index at end of line. $data[icon] should change to $data[‘icon’]

    Before Line 203, add both of these lines:
    if (!isset($password_field)) { $password_field = ”; }
    if (!isset($hc)) { $hc = ”; }

    Improper array index: $data[title] should be changed to $data[‘title’]

    Please use debug notices when you write code. 🙂

Viewing 1 replies (of 1 total)

The topic ‘This Plugin doesn't Respect Good Coding Practice — NOTICES Everywhere’ is closed to new replies.