My Drupal 7 site has many error notices like

Notice: unserialize() [function.unserialize]: Error at offset 225 of 305 bytes in variable_initialize() (line 943 of /site/includes/bootstrap.inc).


Call-time pass-by-reference has been deprecated in drupal_load() in bootstrap.inc

The site still works inspite of the errors. Is it okay to ignore these error notices?

  • What version of PHP are you using?
    – mpdonadio
    Commented May 4, 2012 at 18:48
  • do you get this errors on production site? Commented May 4, 2012 at 18:50
  • 2
    FWIW, the unserialize() error likely means you have a bad value in the {variables} table. That may or may not be serious.
    – mpdonadio
    Commented May 4, 2012 at 19:14
  • 2
    The second error means that you have PHP code like this one somewhere: some_function(&$variable). Possibly in a contributed or custom module.
    – Berdir
    Commented May 4, 2012 at 20:12
  • I am using PHP 5.3.8. Commented May 4, 2012 at 21:49

2 Answers 2


Between the two errors, the first is more worrying.

As variable_set() passes the variables value it receives to serialize(), if unserialize() is not able to understand the saved data, it means the database content is probably corrupted. variable_initialize() calls unserialize() using the following code.

  // Proceed with variable rebuild.
  $variables = array_map('unserialize', db_query('SELECT name, value FROM {variable}')->fetchAllKeyed());
  cache_set('variables', $variables, 'cache_bootstrap');

The second error says the code is using a feature that is deprecated, which means that in future PHP versions the code could not work anymore, but in the actual PHP version is still working.


I'd say it's okay to ignore certain error notices. I usually google them up, first - with full text, then stripping the lines number. If I get a bunch of results pointing to other users' claims, I can then get the idea of what is going on, and sometimes - get a confirmation there's nothing I can do about that.

I used to have many bootstrap.inc errors before I learned to always do module updates one by one, rather than en masse, and always follow each by visiting /update.php to let the hooks pick up necessary database updates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.