This warning is appearing when saving node. PHP 5.4.
My patch is attached.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | taxonomy-illegal-string-offset-1525138-11.patch | 711 bytes | twistor |
| #7 | taxonomy-illegal-string-offset-1525138-7.patch | 848 bytes | twistor |
| taxonomy.patch | 719 bytes | Georgique |
Comments
Comment #1
Georgique commentedComment #2
choster commentedTagged as PHP 5.4 issue.
Comment #3
rogical commentedIt works.
Comment #4
rellimevad commentedWorks here as well. Drupal 7.14 and PHP 5.4.2.
Comment #5
Georgique commentedComment #6
chx commentedThanks 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.
Comment #7
twistor commentedThis 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.
Comment #8
dimamant commentedtaxonomy.patch queued for re-testing.
Comment #9
chx commentedLet's do it. See #6 for reasoning on not having a test.
Comment #10
dries commentedCommitted to 8.x. Thanks!
Moving to 7.x.
Comment #11
twistor commentedTrivial re-roll.
Comment #12
oriol_e9gComment #13
David_Rothstein commentedEh, 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