Skip to content


Repaired getting of token #30

merged 2 commits into from

4 participants

  • token must be string, not array...


Maybe wrap in an is_array($token) just to be safe.


I confirm this issue


ok, fixed, so can someone merge?

@everzet everzet merged commit b9f0dc4 into Behat:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 22, 2012
  1. @nenadalm

    Repaired getting of token

    nenadalm committed
Commits on Mar 2, 2013
  1. @nenadalm

    Checking if token is array

    nenadalm committed
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 Behat/CommonContexts/SymfonyMailerContext.php
5 Behat/CommonContexts/SymfonyMailerContext.php
@@ -107,8 +107,11 @@ public function loadProfile($token = null)
throw new \RuntimeException('Debug-Token not found in response headers. Have you turned on the debug flag?');
$token = isset($headers['X-Debug-Token']) ? $headers['X-Debug-Token'] : $headers['x-debug-token'];
+ if (is_array($token)) {
+ $token = end($token);
+ }
return $this->kernel->getContainer()->get('profiler')->loadProfile($token);
Something went wrong with that request. Please try again.