#6036 closed defect (bug) (no action required)
MySQL Strict Mode
Reported by: | imath | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
Since WP changeset 30400 WPDB: Force STRICT_ALL_TABLES
. Although i didn't see any warning using BuddyPress so far, i've noticed a test was failing in tests/phpunit/testcases/groups/cache.php : BP_Tests_Group_Cache->test_groups_get_group_admins_cache
The problem in the test is that it's running groups_promote_member() on a user that is not yet a member. So some fields are not set in the db.
As boonebgorges suggested, this ticket can act as a catch-all for fixing our INSERT/UPDATE statements so that they're strict-mode compatible.
For now i'll attach the patch i suggest for the unit test to fix the Database error it's generating.
Attachments (1)
Change History (9)
#2
follow-up:
↓ 3
@
10 years ago
If this unit test is the only thing throwing errors, then fixing it is obviously good. But *if* we are able to trigger genuine SQL errors after #WP30400 through normal use, then: we probably need to do a minor release on the current branch for 4.1 compat; and also comment on that core trac ticket that we've run into the same problem.
But it sounds like we need to do manually test BP on the WP trunk to see if we have a problem. :)
#4
@
10 years ago
i think we should commit the patch on the unit test
Yes
i suggest to wait we are sure there are no impacts before moving forward in #6008.
No. If we have to wait on #6008, we have to wait on every ticket. I don't think this is necessary. Let's just keep an eye out and fix specific strict-mode-related issues as they arise, but let's not hold up work on the rest of BuddyPress.
#5
@
10 years ago
Sorry for being a "tête de linottes" on my latest comment. I forgot we had 2.1 branch!
I'm goint to commit this ticket's patch and the remove link thing on the other ticket.
Then, i'll begin checking queries.
#7
@
10 years ago
- Milestone 2.2 deleted
- Resolution set to invalid
- Status changed from new to closed
This was pulled out of WP in [WP30587]. Let's close this ticket and worry about it when/if it's put back.
6036.patch looks good.