Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When the site crashes, there's this additional error:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function backtrace_error_handler(), 4 passed in /Users/joachim/Sites/mysite/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php on line 240 and exactly 5 expected in /Users/joachim/Sites/mysite/web/modules/contrib/devel/devel.module:196 Stack trace: #0 /Users/joachim/Sites/mysite/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php(240): backtrace_error_handler(2, 'session_write_c...', 'Unknown', 0) #1 [internal function]: Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->Symfony\Component\HttpFoundation\Session\Storage\{closure}(2, 'session_write_c...', 'Unknown', 0, NULL) #2 [internal function]: session_write_close() #3 {main} thrown in /Users/joachim/Sites/mysite/web/modules/contrib/devel/devel.module on line 196
Comment | File | Size | Author |
---|---|---|---|
#4 | 3028204-4.patch | 1.07 KB | johne |
|
Issue fork devel-3028204
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mike82 CreditAttribution: mike82 commentedI'm getting the same error.
I made the last argument to the function optional, now it works:
function backtrace_error_handler($error_level, $message, $filename, $line, $context = [])
However I don't really know what's happening here and whether this is right or not. $filename, $line and $context are not used at all by this function.
Comment #3
joachim CreditAttribution: joachim as a volunteer commentedDuplicate of #2947291: Missing argument 5 for _drupal_error_handler().
Comment #4
johne CreditAttribution: johne as a volunteer and at CivicActions commentedI'm running drupal core 8.6.13 where the patch from #2947291 has been committed. The same change is needed, but to devel.module, not bootstrap.inc in drupal core. Here's a patch.
Comment #5
willzyx CreditAttribution: willzyx commentedComment #7
willzyx CreditAttribution: willzyx commentedCommitted and pushed to 8.x. Thanks!
Comment #9
loopy1492 CreditAttribution: loopy1492 commentedSo apparently there's no devel/issues page on drupal.org? I can't submit a new issue for the d7 version of this error so I guess I'll put it here.
Error:
The resolution is exactly the same as for these other issues, just on a different line in the code.
My patch: