Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Exception: DateTimeZone::__construct(): #9

Closed
tkembo opened this issue Nov 9, 2019 · 7 comments
Closed

Uncaught Exception: DateTimeZone::__construct(): #9

tkembo opened this issue Nov 9, 2019 · 7 comments
Labels

Comments

@tkembo
Copy link
Contributor

tkembo commented Nov 9, 2019

I'm getting the following bug when I visit the /admin.php?page=wcinvoicepdf_invoices URL

An error of type E_ERROR was caused in line 112 of the file /wp-content/plugins/wc-invoice-pdf/menu/invoice-menu.php. Error message: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone () in /wp-content/plugins/wc-invoice-pdf/menu/invoice-menu.php:112
Stack trace:
#0 /wp-content/plugins/wc-invoice-pdf/menu/invoice-menu.php(112): DateTimeZone->__construct('')
#1 /wp-includes/class-wp-hook.php(286): WCInvoicePdf\Menu\InvoiceMenu->DisplayInvoices('')
#2 /wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#3 /wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#4 /wp-admin/admin.php(253): do_action('wc-invoices_pag...')
#5 {main}
  thrown
@ole1986
Copy link
Owner

ole1986 commented Nov 9, 2019

@tkembo Which version are you using?

@tkembo
Copy link
Contributor Author

tkembo commented Nov 9, 2019

I'm on Version 1.4.7

@ole1986
Copy link
Owner

ole1986 commented Nov 9, 2019

Can you please check your database table wp_options for the option_name timezone_string and let me know the value?

@tkembo
Copy link
Contributor Author

tkembo commented Nov 9, 2019

there is no timezone_string in the table. There is only time_format and date_format. Could that be the reason?

@ole1986 ole1986 added the bug label Nov 9, 2019
@ole1986
Copy link
Owner

ole1986 commented Nov 9, 2019

Yes, this is the reason. It does not check for any default value. So timezone "" is invalid.
As a workaround you can save a timezone from the wordpress settings page matching one of those in the list

Alternatively I am going to patch this in the next version 1.5.0

@tkembo
Copy link
Contributor Author

tkembo commented Nov 9, 2019

thank you. this was very helpful.
Out of interest, when can we expect version 1.5.0 to come out?

ole1986 pushed a commit that referenced this issue Nov 9, 2019
@ole1986
Copy link
Owner

ole1986 commented Nov 9, 2019

Since v1.5.0 is only a compatibility update to wp-ispconfig3 it may happen very soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants