dpovshed / octopus

Sitemap checker/stress test tool based on ReactPHP
11 stars 1 forks source link

Gracefully deal with unavailable target files #38

Closed holtkamp closed 5 years ago

holtkamp commented 5 years ago

fopen() returns false in case of failure, causing an error like:

First parameter must be a valid stream resource: 
#0 /app/vendor/octopoda/octopus/src/Processor.php(184): React\Stream\ReadableResourceStream->__construct(false, Object(React\EventLoop\StreamSelectLoop)) 
#1 /app/vendor/octopoda/octopus/src/Processor.php(177): Octopus\Processor->getStream() 
#2 /app/vendor/octopoda/octopus/src/Processor.php(127): Octopus\Processor->getTargetManager() 
#3 /app/MyCommand.php: Octopus\Processor->__construct(Object(Octopus\Config),

It would be nice to be able to deal with this situation.

holtkamp commented 5 years ago

Resolved with https://github.com/dpovshed/octopus/pull/39 Tagged in https://github.com/dpovshed/octopus/releases/tag/0.5.3