Skip to content

Commit 58c4efa

Browse files
committed
Added support for parameterized virtual tables
- When using parameterized virtual tables without parameters, PHP will not moan about the missing parameter when not defined as optional.
1 parent 52d4567 commit 58c4efa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Tools/VirtualTables.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ public function get($tableName) {
3333
if($this->has($tableName)) {
3434
$table = $this->virtualTables[(string) $tableName];
3535
if($table instanceof \Closure) {
36-
$params = [];
3736
if($tableName instanceof VirtualTable) {
3837
$params = $tableName->getParams();
38+
return call_user_func($table, $params);
3939
}
40-
return call_user_func($table, $params);
40+
return call_user_func($table);
4141
}
4242
return $table;
4343
}

0 commit comments

Comments
 (0)