This warning is appearing when saving node. PHP 5.4.
My patch is attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Georgique’s picture

Status: Active » Needs review
choster’s picture

Issue tags: +PHP 5.4

Tagged as PHP 5.4 issue.

rogical’s picture

It works.

rellimevad’s picture

Works here as well. Drupal 7.14 and PHP 5.4.2.

Georgique’s picture

Status: Needs review » Reviewed & tested by the community
chx’s picture

Version: 7.12 » 8.x-dev
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs backport to D7

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.

twistor’s picture

Status: Needs work » Needs review
FileSize
848 bytes

This is really due to the #conjunction key in the return array of $query->conditions() being a string, not because field is 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.

dimamant’s picture

taxonomy.patch queued for re-testing.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Let's do it. See #6 for reasoning on not having a test.

Dries’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 8.x. Thanks!

Moving to 7.x.

twistor’s picture

Status: Patch (to be ported) » Needs review
FileSize
711 bytes

Trivial re-roll.

oriol_e9g’s picture

Status: Needs review » Reviewed & tested by the community
David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

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

Automatically closed -- issue fixed for 2 weeks with no activity.