We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8399746 commit 91cb547Copy full SHA for 91cb547
src/CommandLineParser.php
@@ -17,7 +17,7 @@ public function __construct(mixed $parser = null)
17
$filename = __DIR__ . "/../docopt.txt";
18
$handler = @fopen($filename, 'r');
19
$filesize = filesize($filename);
20
- if (!is_null($handler) && ($filesize > 0)) {
+ if (($handler !== false) && ($filesize > 0)) {
21
$fileData = fread($handler, $filesize);
22
if (is_string($fileData)) {
23
$this->parserDescriptor = $fileData;
0 commit comments