mirror of
https://github.com/flarum/framework.git
synced 2025-04-26 14:44:03 +08:00
AbstractServer: Allow omitting base path parameter
It will be inferred from the current directory instead.
This commit is contained in:
parent
cd16adfa69
commit
b5fc7b9bf5
@ -30,8 +30,12 @@ abstract class AbstractServer
|
|||||||
/**
|
/**
|
||||||
* @param string $path
|
* @param string $path
|
||||||
*/
|
*/
|
||||||
public function __construct($path)
|
public function __construct($path = null)
|
||||||
{
|
{
|
||||||
|
if ($path === null) {
|
||||||
|
$path = getcwd();
|
||||||
|
}
|
||||||
|
|
||||||
$this->path = $path;
|
$this->path = $path;
|
||||||
|
|
||||||
if (file_exists($file = $this->path.'/config.php')) {
|
if (file_exists($file = $this->path.'/config.php')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user