1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 14:51:19 +02:00

AbstractServer: Allow omitting base path parameter

It will be inferred from the current directory instead.
This commit is contained in:
Franz Liedke
2016-04-16 13:06:58 +09:00
parent cd16adfa69
commit b5fc7b9bf5

View File

@@ -30,8 +30,12 @@ abstract class AbstractServer
/**
* @param string $path
*/
public function __construct($path)
public function __construct($path = null)
{
if ($path === null) {
$path = getcwd();
}
$this->path = $path;
if (file_exists($file = $this->path.'/config.php')) {