Automattic / WP-Job-Manager

Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
https://wpjobmanager.com
GNU General Public License v3.0
895 stars 366 forks source link

Editing Job Listing breaks if Listing Duration is set too large. #2690

Closed dericleeyy closed 6 months ago

dericleeyy commented 7 months ago

Describe the bug When the listing duration in Settings > Job Manager is set too large, such as 4500000000000000000 days, the job editor will no longer work. Editing Product Package will also break, if WC Paid Listing is used.

This fatal error occurs:

Ein Fehler vom Typ E_ERROR wurde in der Zeile 1493 der Datei /var/www/clients/client1/web66/web/wp-content/plugins/wp-job-manager/wp-job-manager-functions.php verursacht. Fehlermeldung: Uncaught Exception: Unknown or bad format (P4500000000000000000D) in /var/www/clients/client1/web66/web/wp-content/plugins/wp-job-manager/wp-job-manager-functions.php:1493

Stack trace:

#0 /var/www/clients/client1/web66/web/wp-content/plugins/wp-job-manager/wp-job-manager-functions.php(1493): DateInterval->__construct()

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings > Job Submission
  2. Set the listing duration to 4500000000000000000 days
  3. Edit a job listing

Expected Behaviour

There should be a maximum limit to how long the listing duration can be set.

Isolating the problem (mark completed items with an [x]):

WordPress Environment

github-actions[bot] commented 7 months ago

Support References

This comment is automatically generated. Please do not edit it.