Closed bshuchter closed 6 months ago
Also reported multiple times here: https://wordpress.org/support/topic/php-fatal-error-on-job-submission-version-2-2-0/
Thanks, @bshuchter, for the report and details.
I've just done some testing, and the issue only seems to affect PHP 7.4 and below. It does not affect PHP 8.1.
Describe the bug
After the 2.2.0 upgrade, all job submissions don't complete, producing the following error:
Fatal error: Uncaught TypeError: Return value of WP_Job_Manager_Form_Submit_Job::maybe_format_future_datetime() must be an instance of mixed, bool returned in /home/customer/www/chrg.compensationhr.com/public_html/wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php:1098 Stack trace: #0 /home/customer/www/chrg.compensationhr.com/public_html/wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php(1142): WP_Job_Manager_Form_Submit_Job->maybe_format_future_datetime('') #1 /home/customer/www/chrg.compensationhr.com/public_html/wp-content/plugins/wp-job-manager/includes/abstracts/abstract-wp-job-manager-form.php(112): WP_Job_Manager_Form_Submit_Job->preview_handler() #2 /home/customer/www/chrg.compensationhr.com/public_html/wp-includes/class-wp-hook.php(324): WP_Job_Manager_Form->process(Object(WP)) #3 /home/customer/www/chrg.compensationhr.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 /home/customer/www/chrg.com in /home/customer/www/chrg.compensationhr.com/public_html/wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php on line 1098
I downgrade to version 2.1.1 and the form is able to submit job listings successfully.
I believe the error above has to do with the new scheduling function in 2.2.0, but you would know that better than I.
Other than this issue, thanks for a great plugin!