diff --git a/src/classes/check.php b/src/classes/check.php index 61842d1..8e12c87 100644 --- a/src/classes/check.php +++ b/src/classes/check.php @@ -97,7 +97,12 @@ protected function getFileContents( pchRepository $repository, $file ) $fileContents->argument( $file ); $fileContents->execute(); - $stream = fopen( 'string://', 'w' ); + if ( !in_array( 'pchString', stream_get_wrappers() ) ) + { + stream_wrapper_register( 'pchString', 'pchStringStream' ); + } + + $stream = fopen( 'pchString://', 'w' ); fwrite( $stream, $fileContents->stdoutOutput ); fseek( $stream, 0 ); return $stream;