Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#49135 closed defect (bug) (duplicate)

value not null constraint violation in options.php

Reported by: thomas66's profile thomas66 Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3.2
Component: Options, Meta APIs Keywords:
Focuses: Cc:


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:

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)

#1 @SergeyBiryukov
4 years ago

  • Focuses coding-standards removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #45078.

Note: See TracTickets for help on using tickets.