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
CommentFileSizeAuthor
#4 3028204-4.patch1.07 KBjohne

Issue fork devel-3028204

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

mike82’s picture

I'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.

joachim’s picture

Status: Active » Closed (duplicate)
johne’s picture

Status: Closed (duplicate) » Active
FileSize
1.07 KB

I'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.

willzyx’s picture

Status: Active » Needs review

  • willzyx committed ce53ffb on 8.x-2.x authored by johne
    Issue #3028204 by johne: Uncaught ArgumentCountError: Too few arguments...
willzyx’s picture

Status: Needs review » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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

loopy1492’s picture

So 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:

Error message
ArgumentCountError: Too few arguments to function backtrace_error_handler(), 4 passed and exactly 5 expected in backtrace_error_handler() (line 698 of /var/www/docroot/modules/contrib/devel/devel.module).

The resolution is exactly the same as for these other issues, just on a different line in the code.

My patch:

diff --git a/devel.module b/devel.module
index ebbbd02d..dfffece7 100755
--- a/devel.module
+++ b/devel.module
@@ -695,7 +695,7 @@ function devel_boot() {
  *   An array that points to the active symbol table at the point the error
  *   occurred.
  */
-function backtrace_error_handler($error_level, $message, $filename, $line, $context) {
+function backtrace_error_handler($error_level, $message, $filename = NULL, $line = NULL, $context = NULL) {
   // Hide stack trace and parameters from unqualified users.
   if (!user_access('access devel information')) {
     // Do what core does in bootstrap.inc and errors.inc.

andrew.farquharson made their first commit to this issue’s fork.