wordcamp.org icon indicating copy to clipboard operation
wordcamp.org copied to clipboard

Camptix Invoices: Avoid a PHP Notice if not yet setup.

Open dd32 opened this issue 1 year ago • 1 comments

A semi-annoying PHP Notice is being generated when creating an invoice on the WordCamp site, but the Camptix VAT ID field hasn't been set.

GET https://xxxxxxxxx.wordcamp.org/2024/wp-admin/post-new.php?post_type=tix_invoice

E_NOTICE: Undefined index: invoice-vat-number
File: wp-content/plugins/camptix-invoices/camptix-invoices.php:261
Stack Trace: require('wp-admin/edit-form-advanced.php'), do_meta_boxes, ctx_invoice_metabox_editable

This doesn't appear to indicate anything is wrong, just that the specific settings haven't yet been updated.

dd32 avatar Oct 15 '24 08:10 dd32

Few more...

POST https://xxxxxxxxx.wordcamp.org/2024/wp-admin/post.php

Stack Trace: edit_post, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, ctx_generate_invoice_document, CampTix_Addon_Invoices::create_invoice_document, include('/plugins/camptix-invoices/includes/views/invoice-template.php')

E_NOTICE Undefined index: invoice-thankyou
File: wp-content/plugins/camptix-invoices/includes/views/invoice-template.php:211

E_NOTICE Undefined index: invoice-company
File: wp-content/plugins/camptix-invoices/includes/views/invoice-template.php:135

E_NOTICE Undefined index: invoice-date-format
File: wp-content/plugins/camptix-invoices/includes/class-camptix-addon-invoices.php:376

dd32 avatar Oct 15 '24 09:10 dd32