Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

PHP Notices

$
0
0

Replies: 0

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 hour, 5 minutes ago by KTS915.

Viewing all articles
Browse latest Browse all 67836

Trending Articles