[wp-trac] [WordPress Trac] #49135: value not null constraint violation in options.php
WordPress Trac
noreply at wordpress.org
Sun Jan 5 15:48:13 UTC 2020
#49135: value not null constraint violation in options.php
--------------------------------+-----------------------------
Reporter: thomas66 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: 5.3.2
Severity: normal | Keywords:
Focuses: coding-standards |
--------------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49135>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list