I recently upgraded to PHP 7.0.16 on my opensuse 13.1 beta server to test out how our site will run. I'm getting an error in the Drupal 7 recent logs page everytime I try to run cron.
TypeError: Argument 2 passed to db_query() must be of the type array, string given, called in sites/default/modules/feeds_imagegrabber/feeds_imagegrabber.module on line 127 in db_query() (line 2401 of includes/database/database.inc).
Running cron from within Drupal produces this error with a white screen and the message:
The website encountered an unexpected error. Please try again later.

CommentFileSizeAuthor
#4 invalid_argument-2859003-3.diff525 bytesidflood
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mslywka created an issue. See original summary.

specificleaf’s picture

Same error when trying to remove content:

TypeError: Argument 2 passed to db_query() must be of the type array, string given, called in /path/to/drupal/sites/all/modules/feeds_imagegrabber/feeds_imagegrabber.module on line 127 in db_query() (line 2401 of /path/to/drupal/includes/database/database.inc).

idflood’s picture

Title: TypeError when running cron » TypeError when deleting an item or running cron
idflood’s picture

Status: Active » Needs review
FileSize
525 bytes

Here is a simple patch for this.

zorax’s picture

thank's it' works well.

Dan Kolbas’s picture

I ran into this issue as well. Then made a patch before i noticed this was filled, but your solution looks good too.

calebtr’s picture

The patch in #4 works well.

rooby’s picture

Liam Morland’s picture

Issue tags: -TypeError PHP7 +PHP 7.0