Skip to content

Commit 6119ad4

Browse files
author
Jesse Young
committed
make HTTPServer constructor options optional
1 parent fc59bbe commit 6119ad4

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

httpserver.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ class HTTPServer
2525
*/
2626
private $requests = array(/* socket_id => HTTPRequest */);
2727

28-
function __construct($options)
28+
function __construct($options = null)
2929
{
30-
foreach ($options as $k => $v)
30+
if ($options)
3131
{
32-
$this->$k = $v;
32+
foreach ($options as $k => $v)
33+
{
34+
$this->$k = $v;
35+
}
3336
}
3437
}
3538

0 commit comments

Comments
 (0)