Skip to content

Commit ee26f9a

Browse files
committed
parse-mf2: read whole contents of STDIN
[`fgets(STDIN)` reads only one line](https://www.php.net/manual/en/function.fgets.php), but we want to pass a string containing the whole contents of the input to `Mf2\parse`.
1 parent 18ca688 commit ee26f9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/parse-mf2

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if (!empty($argv[1])) {
2828
$url = null;
2929
}
3030

31-
$result = Mf2\parse(fgets(STDIN), $url);
31+
$result = Mf2\parse(file_get_contents("php://stdin"), $url);
3232

3333
if (defined('JSON_PRETTY_PRINT')) {
3434
echo json_encode($result, JSON_PRETTY_PRINT);

0 commit comments

Comments
 (0)