Support » Plugin: LittleBot Invoices » PHP Notices

  • KTS915

    (@kts915)


    I know PHP notices aren’t a big deal, but I like to eradicate them if possible. Currently, I see the following if I trash an invoice and then go the list of trashed invoices in the WP back-end:

    
    Notice: Undefined index: trash in ~/wp-content/plugins/littlebot-invoices/includes/class-lbi-columns.php on line 49
    

    I get an analogous notice when looking at trashed estimates, but this time referring to line 51.

    What seems to solve this — although I recognize that your superior expertise may find a better solution — is to replace the following lines in class-lbi-columns.php:

    
    if ( $current_screen->post_type == 'lb_invoice' ) {
        echo LBI()->invoice_statuses[$status_slug]['label'];
    } else {
        echo LBI()->estimate_statuses[$status_slug]['label'];
    }
    

    with this:

    
    echo $status_slug;
    
    • This topic was modified 1 year ago by  KTS915.
  • The topic ‘PHP Notices’ is closed to new replies.