Opened 7 years ago
Closed 7 years ago
#49135 closed defect (bug) (duplicate)
value not null constraint violation in options.php
| Reported by: | thomas66 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Options, Meta APIs | Version: | 5.3.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there, welcome to WordPress Trac!
Thanks for the report, we're already tracking this issue in #45078.