Skip to content

Commit b04a645

Browse files
committed
Wamp route sending null "meta" values
1 parent c2f126f commit b04a645

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

src/Debug/Route/Wamp.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ private function publishMeta()
358358
*/
359359
private function publishMetaGet()
360360
{
361-
$metaVals = array(
361+
$default = array(
362+
'argv' => array(),
362363
'HTTPS' => null,
363364
'HTTP_HOST' => null,
364365
'processId' => \getmypid(),
@@ -369,20 +370,16 @@ private function publishMetaGet()
369370
'SERVER_ADDR' => null,
370371
'SERVER_NAME' => null,
371372
);
372-
$serverParams = \array_merge(
373-
array(
374-
'argv' => array(),
375-
),
376-
$this->debug->serverRequest->getServerParams(),
377-
$metaVals
373+
$metaVals = \array_merge(
374+
$default,
375+
$this->debug->serverRequest->getServerParams()
378376
);
379-
foreach (\array_keys($metaVals) as $k) {
380-
$metaVals[$k] = $serverParams[$k];
381-
}
377+
$metaVals = \array_intersect_key($metaVals, $default);
382378
if ($this->debug->isCli()) {
383379
$metaVals['REQUEST_METHOD'] = null;
384-
$metaVals['REQUEST_URI'] = '$: ' . \implode(' ', $serverParams['argv']);
380+
$metaVals['REQUEST_URI'] = '$: ' . \implode(' ', $metaVals['argv']);
385381
}
382+
unset($metaVals['argv']);
386383
return $metaVals;
387384
}
388385
}

0 commit comments

Comments
 (0)