Posted by Georgique on April 10, 2012 at 5:56am
14 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | taxonomy.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | needs backport to D7, PHP 5.4 |
Issue Summary
This warning is appearing when saving node. PHP 5.4.
My patch is attached.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| taxonomy.patch | 719 bytes | Idle | FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch taxonomy_2.patch. Unable to apply patch. See the log in the details link for more information. | View details |
Comments
#1
#2
Tagged as PHP 5.4 issue.
#3
It works.
#4
Works here as well. Drupal 7.14 and PHP 5.4.2.
#5
#6
Thanks for working on this issue. However, there are a few process problems with: a) It is customary not to RTBC your issue however as others reviewed it and it's quite simple, that's fine b) in order to make sure we do not regress bugs are first fixed in Drupal 8. That's more of a problem. A c) would be to add tests but I am not too keen on demanding a test for every isset() in core.
#7
This is really due to the
#conjunctionkey in the return array of$query->conditions()being a string, not becausefieldis not set.It would be nice if Drupal\Core\Database\Query\Condition implemented the Iterator interface, that way we could iterate over this cleanly and provide another method to access #conjunction. That would also allow us to get rid of the return-by-reference.
#8
taxonomy.patch queued for re-testing.
#9
Let's do it. See #6 for reasoning on not having a test.
#10
Committed to 8.x. Thanks!
Moving to 7.x.
#11
Trivial re-roll.
#12
#13
Eh, silly PHP... I wish we could have gone with the original patch here, since isset() is more self-documenting, but PHP can return TRUE for that even when it's a string, so yeah, I think the newer one works better.
Committed to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/2c7f509
#14
Automatically closed -- issue fixed for 2 weeks with no activity.