Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2404 of /usr/share/drupal7/includes/menu.inc).

Fix Drupal 7 errors/warnings about count(), cache_get(), and each().

Tags: 

Upgrading PHP to 7.2 might break your Drupal 7.

Here are some error/warning examples and how to fix them.

  1. PHP Fatal error: Uncaught Error: Call to undefined function cache_get() in /usr/share/drupal7/includes/module.inc: 750
  2. Warning: count(): Parameter must be an array or an object that implements Countable in theme_table() (line 1997 of /usr/share/drupal7/includes/theme.inc).
  3. Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2404 of /usr/share/drupal7/includes/menu.inc).

Add new comment