Opened 5 years ago
Closed 5 years ago
#49135 closed defect (bug) (duplicate)
value not null constraint violation in options.php
Reported by: | thomas66 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.3.2 |
Component: | Options, Meta APIs | Keywords: | |
Focuses: | Cc: |
Description
the line 277 in /wp-admin/options.php
"$value = null;"
should be changed to
"$value = 0;"
to prevent value not null constraint violation in db table wp_options
steps to reproduce:
1) set strict mode via MySQL config file:
sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION,STRICT_ALL_TABLES
2) remove “STRICT_ALL_TABLES” from the “list of incompatible SQL modes” in wp_db.php, which is defined in $incompatible_modes
3) goto page options-discussions unselect a checkbox like "close_comments_for_old_posts"
step 3 will not work, only with the change above.
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi there, welcome to WordPress Trac!
Thanks for the report, we're already tracking this issue in #45078.