Project:Drupal core
Version:7.0-beta2
Component:base system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Drupal 7.0 beta2:
includes/bootstrap.inc file
drupal_environment_initialize() function
Line 509-510:

  // Enforce E_ALL, but allow users to set levels not part of E_ALL.
  error_reporting(E_ALL | error_reporting());

It doesn't seems logical for me. The E_ALL bits have "1" already. A bit OR doesn't matter. Then the error_reporting is always E_ALL.

Comments

#1

Status:active» needs review

The latest Drupal 7.0 beta3 has this bug too.
I suggest a patch, like this:

--- a/includes/bootstrap.inc Mon Nov 08 12:34:41 2010 +0100
+++ b/includes/bootstrap.inc Mon Nov 15 11:09:25 2010 +0100
@@ -496,9 +496,6 @@ function drupal_environment_initialize()
   // e.g. "&" or "%" that have special meanings in URLs and must be encoded.
   $_GET['q'] = request_path();

-  // Enforce E_ALL, but allow users to set levels not part of E_ALL.
-  error_reporting(E_ALL | error_reporting());
-
   // Override PHP settings required for Drupal to work properly.
   // sites/default/default.settings.php contains more runtime settings.
   // The .htaccess file contains settings that cannot be changed at runtime.

#2

Currently, E_ALL is:
All errors and warnings, as supported, except of level E_STRICT.
So, works as designed?

#3

E_ALL is not problem. The problem, it is not possible to change to others (eg. E_ALL & ~E_NOTICE).

#4

#5

Status:needs review» fixed

webchick just told me:

> This is now configurable under admin/config/development/logging. If you
> don't want it on in production, turn it off.

This means that you can hide notices from displaying. I'm closing this issue.

#6

Status:fixed» closed (fixed)

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

nobody click here