Hi there.

While making an update from 4.6.x to 5.6, I've got a message:

Notice: Undefined offset: 4096 in /Library/WebServer/Documents/drupal/includes/common.inc on line 557
Notice: Undefined offset: 4096 in /Library/WebServer/Documents/drupal/includes/common.inc on line 565

On line 557, it was like this:

$types = array(1 => 'error', 2 => 'warning', 4 => 'parse error', 8 => 'notice', 16 => 'core error', 32 => 'core warning', 64 => 'compile error', 128 => 'compile warning', 256 => 'user error', 512 => 'user warning', 1024 => 'user notice', 2048 => 'strict warning');

But, since PHP 5.2.0, there are more two error types:

4096 E_RECOVERABLE_ERROR (integer) Catchable fatal error. It indicates that a probably dangerous error occured, but did not leave the Engine in an unstable state. If the error is not caught by a user defined handle (see also set_error_handler()), the application aborts as it was an E_ERROR. since PHP 5.2.0
8191 E_ALL (integer) All errors and warnings, as supported, except of level E_STRICT in PHP < 6. 6143 in PHP 5.2.x and 2047 previously

(check it out: http://www.php.net/errorfunc)

So, I've make a patch adding then:

common.inc.patch

--- common.inc  2008-01-14 16:38:13.000000000 -0200
+++ common.inc  2008-01-14 16:40:30.000000000 -0200
@@ -554,7 +554,7 @@
   }
 
   if ($errno & (E_ALL ^ E_NOTICE)) {
-    $types = array(1 => 'error', 2 => 'warning', 4 => 'parse error', 8 => 'notice', 16 => 'core error', 32 => 'core warning', 64 => 'compile error', 128 => 'compile warning', 256 => 'user error', 512 => 'user warning', 1024 => 'user notice', 2048 => 'strict warning');
+    $types = array(1 => 'error', 2 => 'warning', 4 => 'parse error', 8 => 'notice', 16 => 'core error', 32 => 'core warning', 64 => 'compile error', 128 => 'compile warning', 256 => 'user error', 512 => 'user warning', 1024 => 'user notice', 2048 => 'strict warning', 4096 => 'recoverable_error', 8192 => 'all errors and warnings');
     $entry = $types[$errno] .': '. $message .' in '. $filename .' on line '. $line .'.';
 
     // Force display of error messages in update.php

It worked for me! =)

[]s,

Fernão

Comments

jvandyk’s picture

If you'd like to report a bug and provide a patch, please use the Issue queue. See also http://drupal.org/node/115606.