Index: includes/stream_wrappers.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/stream_wrappers.inc,v retrieving revision 1.6 diff -u -p -r1.6 stream_wrappers.inc --- includes/stream_wrappers.inc 31 Aug 2009 05:47:33 -0000 1.6 +++ includes/stream_wrappers.inc 8 Dec 2009 06:09:08 -0000 @@ -500,7 +500,12 @@ abstract class DrupalLocalStreamWrapper public function url_stat($uri, $flags) { $this->uri = $uri; if ($flags & STREAM_URL_STAT_QUIET) { - return @stat($this->getLocalPath()); + if (file_exists($this->getLocalPath())) { + return stat($this->getLocalPath()); + } + else { + return FALSE; + } } else { return stat($this->getLocalPath()); Index: modules/field/modules/field_sql_storage/field_sql_storage.module =================================================================== RCS file: /cvs/drupal/drupal/modules/field/modules/field_sql_storage/field_sql_storage.module,v retrieving revision 1.33 diff -u -p -r1.33 field_sql_storage.module --- modules/field/modules/field_sql_storage/field_sql_storage.module 4 Dec 2009 16:49:46 -0000 1.33 +++ modules/field/modules/field_sql_storage/field_sql_storage.module 8 Dec 2009 07:24:25 -0000 @@ -487,7 +487,11 @@ function field_sql_storage_field_storage foreach ($conditions as $condition) { // A condition is either a (column, value, operator) triple, or a // (column, value) pair with implied operator. - @list($column, $value, $operator) = $condition; + list($column, $value) = $condition; + $operator = NULL; + if (isset($condition[2])) { + $operator = $condition[2]; + } // Translate operator and value if needed. switch ($operator) { case 'STARTS_WITH': Index: modules/filter/filter.module =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v retrieving revision 1.308 diff -u -p -r1.308 filter.module --- modules/filter/filter.module 8 Dec 2009 03:10:51 -0000 1.308 +++ modules/filter/filter.module 8 Dec 2009 07:09:09 -0000 @@ -468,7 +468,8 @@ function filter_default_format($account } // Get a list of formats for this user, ordered by weight. The first one // available is the user's default format. - $format = array_shift(filter_formats($account)); + $formats = filter_formats($account); + $format = reset($formats); return $format->format; } @@ -825,10 +826,13 @@ function _filter_tips($format_id, $long * A DOMDocument that represents the loaded (X)HTML snippet. */ function filter_dom_load($text) { - // Ignore warnings during HTML soup loading. - $dom_document = @DOMDocument::loadHTML('' . $text . ''); + // DOM can load HTML soup. But, HTML soup can throw warnings, suppress + // them. + libxml_use_internal_errors(TRUE); + $document = new DOMDocument(); + $document->loadHTML('' . $text . ''); - return $dom_document; + return $document; } /** Index: modules/simpletest/drupal_web_test_case.php =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v retrieving revision 1.177 diff -u -p -r1.177 drupal_web_test_case.php --- modules/simpletest/drupal_web_test_case.php 6 Dec 2009 18:06:22 -0000 1.177 +++ modules/simpletest/drupal_web_test_case.php 8 Dec 2009 06:09:08 -0000 @@ -424,29 +424,26 @@ abstract class DrupalTestCase { } /** - * Handle errors. + * Handle errors during test runs. * * Because this is registered in set_error_handler(), it has to be public. * @see set_error_handler - * */ public function errorHandler($severity, $message, $file = NULL, $line = NULL) { - if ($severity & error_reporting()) { - $error_map = array( - E_STRICT => 'Run-time notice', - E_WARNING => 'Warning', - E_NOTICE => 'Notice', - E_CORE_ERROR => 'Core error', - E_CORE_WARNING => 'Core warning', - E_USER_ERROR => 'User error', - E_USER_WARNING => 'User warning', - E_USER_NOTICE => 'User notice', - E_RECOVERABLE_ERROR => 'Recoverable error', - ); + $error_map = array( + E_STRICT => 'Run-time notice', + E_WARNING => 'Warning', + E_NOTICE => 'Notice', + E_CORE_ERROR => 'Core error', + E_CORE_WARNING => 'Core warning', + E_USER_ERROR => 'User error', + E_USER_WARNING => 'User warning', + E_USER_NOTICE => 'User notice', + E_RECOVERABLE_ERROR => 'Recoverable error', + ); - $backtrace = debug_backtrace(); - $this->error($message, $error_map[$severity], _drupal_get_last_caller($backtrace)); - } + $backtrace = debug_backtrace(); + $this->error($message, $error_map[$severity], _drupal_get_last_caller($backtrace)); return TRUE; } @@ -539,6 +536,11 @@ class DrupalUnitTestCase extends DrupalT $this->originalPrefix = $db_prefix; $this->originalFileDirectory = file_directory_path(); + // Log fatal errors. + ini_set('log_errors', 1); + // Make all errors visible. + error_reporting(E_ALL); + // Reset all statics so that test is performed with a clean environment. drupal_static_reset(); @@ -1055,6 +1057,8 @@ class DrupalWebTestCase extends DrupalTe // Log fatal errors. ini_set('log_errors', 1); ini_set('error_log', $directory . '/error.log'); + // Make all errors visible. + error_reporting(E_ALL); // Reset all statics so that test is performed with a clean environment. drupal_static_reset(); @@ -1359,12 +1363,14 @@ class DrupalWebTestCase extends DrupalTe if (!$this->elements) { // DOM can load HTML soup. But, HTML soup can throw warnings, suppress // them. - @$htmlDom = DOMDocument::loadHTML($this->content); - if ($htmlDom) { + libxml_use_internal_errors(TRUE); + $document = new DOMDocument(); + $result = $document->loadHTML($this->content); + if ($result) { $this->pass(t('Valid HTML found on "@path"', array('@path' => $this->getUrl())), t('Browser')); // It's much easier to work with simplexml than DOM, luckily enough // we can just simply import our DOM tree. - $this->elements = simplexml_import_dom($htmlDom); + $this->elements = simplexml_import_dom($document); } } if (!$this->elements) { Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.857 diff -u -p -r1.857 system.module --- modules/system/system.module 6 Dec 2009 01:00:27 -0000 1.857 +++ modules/system/system.module 8 Dec 2009 06:09:08 -0000 @@ -2130,6 +2130,7 @@ function _system_rebuild_module_data() { // Include the install profile in modules that are loaded. $profile = drupal_get_profile(); + $modules[$profile] = new stdClass; $modules[$profile]->name = $profile; $modules[$profile]->uri = 'profiles/' . $profile . '/' . $profile . '.profile'; $modules[$profile]->filename = $profile . '.profile';