mirror of
https://github.com/erusev/parsedown.git
synced 2024-09-19 19:41:29 +02:00
Use isset so we don't trigger a warning. Also change to <?php
This commit is contained in:
parent
69fbd76544
commit
c1730c0d00
@ -1,15 +1,13 @@
|
||||
#!/usr/bin/env php
|
||||
<?PHP
|
||||
<?php
|
||||
|
||||
$dir = dirname(__FILE__);
|
||||
require("$dir/../Parsedown.php");
|
||||
|
||||
//////////////////////////////////////////////
|
||||
|
||||
$file_mode = is_readable($argv[1]);
|
||||
|
||||
// From a file
|
||||
if ($file_mode) {
|
||||
if (isset($argv[1]) && is_readable($argv[1])) {
|
||||
$str = file_get_contents($argv[1]);
|
||||
// From STDIN
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user