In a custom module we are extending a core stream wrapper class like:

class MyModuleCustomThemesStreamWrapper extends DrupalPublicStreamWrapper {
  /**
   * Implements abstract public function getDirectoryPath()
   */
...

That causes a fatal error when trying to run update.php:

[04-May-2010 10:00:50] PHP Fatal error:  Class 'DrupalPublicStreamWrapper' not found in sites/all/modules/mymodule/mymodule.module on line 274
[04-May-2010 10:00:50] PHP Stack trace:
[04-May-2010 10:00:50] PHP   1. {main}() update.php:0
[04-May-2010 10:00:50] PHP   2. drupal_bootstrap() update.php:339
[04-May-2010 10:00:50] PHP   3. _drupal_bootstrap_variables() includes/bootstrap.inc:1793
[04-May-2010 10:00:50] PHP   4. module_load_all() includes/bootstrap.inc:1964
[04-May-2010 10:00:50] PHP   5. drupal_load() includes/module.inc:24
[04-May-2010 10:00:50] PHP   6. include_once() includes/bootstrap.inc:900
CommentFileSizeAuthor
#1 789464-update-need-file-1.patch1.01 KBpwolanin

Comments

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

Making sure we include file.inc earlier resolves the fatal error.

mikejoconnor’s picture

Status: Needs review » Reviewed & tested by the community

This makes a lot of sense.

catch’s picture

No brainer, can't be tested afaik.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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