Skip to content

Commit a21d612

Browse files
ralflangRalf Lang
authored and
Ralf Lang
committed
Fix issue with empty-array stack argument
1 parent 4e033fb commit a21d612

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Horde/Routes/Route.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,12 @@ public function match($url, $kargs = array())
686686
$result['subDomain'] = $subDomain;
687687
}
688688

689-
if (!empty($this->stack)) {
689+
/*
690+
* The stack can be null/unset, an empty array or an iterable
691+
* An explicitly empty array expresses "no middleware",
692+
* a null or unset stack means default
693+
*/
694+
if ($this->stack !== null) {
690695
$result['stack'] = $this->stack;
691696
}
692697

0 commit comments

Comments
 (0)